ColorExtensions<T extends Color> extension

on
  • T

Properties

alphaHexadecimal → String

Available on T, provided by the ColorExtensions extension

Returns the alpha value of the color in hexadecimal format.
no setter
analogousColors → Iterable<Color>

Available on T, provided by the ColorExtensions extension

Returns a list of analogous colors.
no setter
argb → int

Available on T, provided by the ColorExtensions extension

A 32 bit value representing this color.
no setter
b → double

Available on T, provided by the ColorExtensions extension

Returns the black component of the color in CMYK color model.
no setter
brightness → double

Available on T, provided by the ColorExtensions extension

Returns the brightness of the color.
no setter
c → double

Available on T, provided by the ColorExtensions extension

Returns the cyan component of the color in CMYK color model.
no setter
closestColor → NamedColor?

Available on T, provided by the ColorExtensions extension

Return the closest NamedColor to this color.
no setter
closestColorName → String

Available on T, provided by the ColorExtensions extension

Returns the name of the closest NamedColor to this color.
no setter
cmyk → List<double>

Available on T, provided by the ColorExtensions extension

no setter
complementaryColor → Color

Available on T, provided by the ColorExtensions extension

Returns the complementary color.
no setter
css → String

Available on T, provided by the ColorExtensions extension

Returns the CSS representation of the color.
no setter
dominantValue → double

Available on T, provided by the ColorExtensions extension

Returns the dominant value among the red, green, and blue components.
no setter
hexadecimal → String

Available on T, provided by the ColorExtensions extension

Returns the hexadecimal representation of the color.
no setter
hsl → HSLColor

Available on T, provided by the ColorExtensions extension

Returns the HSL representation of the color.
no setter
hsv → HSVColor

Available on T, provided by the ColorExtensions extension

Returns the HSV representation of the color.
no setter
hue → double

Available on T, provided by the ColorExtensions extension

Returns the hue of the color.
no setter
isDark → bool

Available on T, provided by the ColorExtensions extension

Returns true if the color is dark.
no setter
isLight → bool

Available on T, provided by the ColorExtensions extension

Returns true if the color is light.
no setter
lightness → double

Available on T, provided by the ColorExtensions extension

Returns the lightness of the color.
no setter
luminance → double

Available on T, provided by the ColorExtensions extension

The Luminance of this color. The Luminance is a measure of the brightness of a color. Returns a brightness value between 0 for darkest and 1 for lightest. This value is computationally expensive to calculate.
no setter
m → double

Available on T, provided by the ColorExtensions extension

Returns the magenta component of the color in CMYK color model.
no setter
rgb → Iterable<double>

Available on T, provided by the ColorExtensions extension

no setter
rgba → Iterable<double>

Available on T, provided by the ColorExtensions extension

no setter
saturation → double

Available on T, provided by the ColorExtensions extension

Returns the saturation of the color.
no setter
splitComplementaryColors → Iterable<Color>

Available on T, provided by the ColorExtensions extension

Returns a list of split-complementary colors.
no setter
tetradicColors → Iterable<Color>

Available on T, provided by the ColorExtensions extension

Returns a list of tetradic colors.
no setter
triadicColors → Iterable<Color>

Available on T, provided by the ColorExtensions extension

Returns a list of triadic colors.
no setter
y → double

Available on T, provided by the ColorExtensions extension

Returns the yellow component of the color in CMYK color model.
no setter

Methods

compareColor(dynamic other) → int

Available on T, provided by the ColorExtensions extension

Compares this color to another color.
distanceTo(Color color) → double

Available on T, provided by the ColorExtensions extension

Calculates the distance between this HSVColor and the provided color.
floatToInt8(double x) → int

Available on T, provided by the ColorExtensions extension

getContrastColor([double percent = .8]) → Color

Available on T, provided by the ColorExtensions extension

Returns a contrast color based on the brightness of the first color: A light color if the first color is dark. A dark color if the first color is light.
isNamedColor(String value) → bool

Available on T, provided by the ColorExtensions extension

Checks if the color is a named color.
lerp(Color toColor, double amount) → Color

Available on T, provided by the ColorExtensions extension

Blends two colors using Lerp
makeDarker([double percent = .5]) → Color

Available on T, provided by the ColorExtensions extension

Darkens the color by blending it with black
makeLighter([double percent = .5]) → Color

Available on T, provided by the ColorExtensions extension

Lightens the color by blending it with white
mergeWith(Color anotherColor, double percent) → Color

Available on T, provided by the ColorExtensions extension

Blends two colors based on a percentage
mixChannel(Color other, double proportion) → Color

Available on T, provided by the ColorExtensions extension

modColor(int degrees) → Color

Available on T, provided by the ColorExtensions extension

Returns a color modified by the provided degrees int the color wheel.
modColors(IntList degrees) → Iterable<Color>

Available on T, provided by the ColorExtensions extension

Returns a list of colors that are modified by the provided degrees int the color wheel.

Operators

operator *(dynamic other) → Color

Available on T, provided by the ColorExtensions extension

operator +(dynamic other) → Color

Available on T, provided by the ColorExtensions extension

operator -(dynamic other) → dynamic

Available on T, provided by the ColorExtensions extension