Hex extension

Color Extensions

on

Properties

getBrightness double

Available on Color, provided by the Hex extension

Returns the brightness of the color.
no setter
getLuminance double

Available on Color, provided by the Hex extension

Returns the luminance of the color.
no setter
isDark bool

Available on Color, provided by the Hex extension

Returns true if the color is dark, otherwise false.
no setter
isLight bool

Available on Color, provided by the Hex extension

Returns true if the color is light, otherwise false.
no setter

Methods

createMaterialColor() MaterialColor

Available on Color, provided by the Hex extension

Creates a MaterialColor from the color.
darken([double amount = .1]) Color

Available on Color, provided by the Hex extension

Darken the color by percentage (0.0 to 1.0).
lighten([double amount = .1]) Color

Available on Color, provided by the Hex extension

Lighten the color by percentage (0.0 to 1.0).
toHex({bool leadingHashSign = true, bool includeAlpha = false}) String

Available on Color, provided by the Hex extension

Converts the Flutter color to a hex string.