Hex extension
Color Extensions
- on
Properties
- getBrightness → double
-
Returns the brightness of the color.
no setter
- getLuminance → double
-
Returns the luminance of the color.
no setter
- isDark → bool
-
Returns
true
if the color is dark, otherwisefalse
.no setter - isLight → bool
-
Returns
true
if the color is light, otherwisefalse
.no setter
Methods
-
createMaterialColor(
) → MaterialColor - Creates a MaterialColor from the color.
-
darken(
[double amount = .1]) → Color -
Darken the color by
percentage
(0.0 to 1.0). -
lighten(
[double amount = .1]) → Color -
Lighten the color by
percentage
(0.0 to 1.0). -
toHex(
{bool leadingHashSign = true, bool includeAlpha = false}) → String - Converts the Flutter color to a hex string.