- Removed color extension

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
Hans Kokx
2024-10-30 10:13:30 +01:00
parent 485f5863aa
commit 9f8d85f543
6 changed files with 5 additions and 35 deletions
-1
View File
@@ -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";
-14
View File
@@ -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;
}
}