Hex extension
Color Extensions
- on
Methods
-
createMaterialColor(
) → MaterialColor - Creates a MaterialColor from the color.
-
darken(
[double amount = .1]) → Color -
Available on Color, provided by the Hex extension
Darken the color bypercentage
(0.0 to 1.0). -
getBrightness(
) → double - Returns the brightness of the color.
-
getLuminance(
) → double - Returns the luminance of the color.
-
isDark(
) → bool -
Available on Color, provided by the Hex extension
Returnstrue
if the color is dark, otherwisefalse
. -
isLight(
) → bool -
Available on Color, provided by the Hex extension
Returnstrue
if the color is light, otherwisefalse
. -
lighten(
[double amount = .1]) → Color -
Available on Color, provided by the Hex extension
Lighten the color bypercentage
(0.0 to 1.0). -
toHex(
{bool leadingHashSign = true, bool includeAlpha = false}) → String - Converts the Flutter color to a hex string.
-
withColorOpacity(
double value) → Color -
Available on Color, provided by the Hex extension
replaced with the givenopacity
(which ranges from 0.0 to 1.0).