ColorX extension
Color manipulation and conversion extensions.
- on
Properties
- complementary → Color
-
Available on Color, provided by the ColorX extension
Returns the complementary color (180° hue rotation).no setter - contrastText → Color
-
Available on Color, provided by the ColorX extension
The most readable monochrome text color for this background.no setter - isDark → bool
-
Available on Color, provided by the ColorX extension
Whether the color is perceptually dark.no setter - isLight → bool
-
Available on Color, provided by the ColorX extension
Whether the color is perceptually light.no setter
Methods
-
darken(
[double amount = 0.1]) → Color -
Available on Color, provided by the ColorX extension
Darkens the color byamount(0..1). -
lighten(
[double amount = 0.1]) → Color -
Available on Color, provided by the ColorX extension
Lightens the color byamount(0..1). -
mixWith(
Color other, [double amount = 0.5]) → Color -
Available on Color, provided by the ColorX extension
Blends this color withotherbyamount(0..1). -
rotateHue(
double degrees) → Color -
Available on Color, provided by the ColorX extension
Rotates the hue bydegrees. -
toHex(
{bool withAlpha = true}) → String -
Available on Color, provided by the ColorX extension
Converts to an 8-digit hex string#AARRGGBB. -
toMaterialColor(
) → MaterialColor -
Available on Color, provided by the ColorX extension
Creates a MaterialColor swatch from this color. -
withAlphaFraction(
double fraction) → Color - Applies an alpha fraction relative to the current alpha.
-
withOpacity(
double opacity) → Color -
Available on Color, provided by the ColorX extension
Returns this color withopacity(0..1) applied.