ColorX extension
- on
Properties
- complementary → Color
-
Available on Color, provided by the ColorX extension
no setter - contrastText → Color
-
Available on Color, provided by the ColorX extension
no setter - greyscale → Color
-
Available on Color, provided by the ColorX extension
no setter - hue → double
-
Available on Color, provided by the ColorX extension
Hue in degrees,0to360.no setter - isDark → bool
-
Available on Color, provided by the ColorX extension
no setter - isLight → bool
-
Available on Color, provided by the ColorX extension
no setter - isOpaque → bool
-
Available on Color, provided by the ColorX extension
Whether this color is fully opaque.no setter - isTransparent → bool
-
Available on Color, provided by the ColorX extension
Whether this color is fully transparent.no setter - lightness → double
-
Available on Color, provided by the ColorX extension
Lightness in[0, 1].no setter - opaque → Color
-
Available on Color, provided by the ColorX extension
This color at full opacity.no setter - saturation → double
-
Available on Color, provided by the ColorX extension
Saturation in[0, 1].no setter - splitComplementary → (Color, Color)
-
Available on Color, provided by the ColorX extension
no setter - tetradic → (Color, Color, Color)
-
Available on Color, provided by the ColorX extension
no setter - triadic → (Color, Color)
-
Available on Color, provided by the ColorX extension
no setter
Methods
-
analogous(
{int count = 2, double spreadDegrees = 30}) → List< Color> -
Available on Color, provided by the ColorX extension
Returns2 * countanalogous colors:countsteps to the left andcountto the right of this color on the hue wheel, interleaved asleft1, right1, left2, right2, …. -
bestContrast(
[List< Color> candidates = const [Colors.white, Colors.black]]) → Color -
Available on Color, provided by the ColorX extension
Picks the highest-contrast color fromcandidates(defaults to white/black). -
contrastRatio(
Color other) → double -
darken(
[double amount = ColorMath.defaultAmount]) → Color -
desaturate(
[double amount = ColorMath.defaultAmount]) → Color -
lighten(
[double amount = ColorMath.defaultAmount]) → Color -
meetsWcagAA(
Color background) → bool -
meetsWcagAAA(
Color background) → bool -
mix(
Color other, [double t = 0.5]) → Color -
Available on Color, provided by the ColorX extension
Linearly interpolates towardother.t = 0returns this color;t = 1returnsother. -
monochromatic(
{int count = 5}) → List< Color> -
Available on Color, provided by the ColorX extension
A same-hue lightness ramp. See ColorMath.monochromatic. -
saturate(
[double amount = ColorMath.defaultAmount]) → Color -
shade(
[double amount = 0.5]) → Color -
tint(
[double amount = 0.5]) → Color -
toCssRgba(
{int alphaPrecision = 2}) → String -
Available on Color, provided by the ColorX extension
CSSrgba(...)notation. -
toHexARGB(
{bool withHashSign = true}) → String -
Available on Color, provided by the ColorX extension
8-char ARGB:#CCFF5500. -
toHexRGB(
{bool withHashSign = true}) → String -
Available on Color, provided by the ColorX extension
6-char RGB:#FF5500. -
toMaterialColor(
) → MaterialColor -
withAlphaOpacity(
double opacity) → Color -
withHue(
double value) → Color - Returns this color with its hue replaced. Wraps values outside 0–360.
-
withLightness(
double value) → Color -
Available on Color, provided by the ColorX extension
Returns this color with its lightness replaced, clamped to[0, 1]. -
withSaturation(
double value) → Color -
Available on Color, provided by the ColorX extension
Returns this color with its saturation replaced, clamped to[0, 1].