mirror of
https://github.com/hanskokx/arcane_helper_utils.git
synced 2026-05-14 02:19:09 +02:00
v1.1.3
- Removed color extension Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
library arcane_helper_utils;
|
||||
|
||||
export "package:arcane_helper_utils/src/extensions/color.dart";
|
||||
export "package:arcane_helper_utils/src/extensions/date_time.dart";
|
||||
export "package:arcane_helper_utils/src/extensions/string.dart";
|
||||
export "package:arcane_helper_utils/src/extensions/string_jwt.dart";
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import "package:pure_dart_ui/pure_dart_ui.dart";
|
||||
|
||||
/// A collection of extensions for the `Color` class.
|
||||
extension ColorsExtensions on Color {
|
||||
/// Determines if the color is considered dark.
|
||||
///
|
||||
/// A color is considered dark if its luminance is less than 0.5.
|
||||
bool get isDark {
|
||||
final luminance = computeLuminance();
|
||||
// Luminance values range from 0 to 1, where 0 is black and 1 is white.
|
||||
// A luminance value below 0.5 indicates a dark color.
|
||||
return luminance < 0.5;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user