ColorShades class

Implemented types
Available extensions

Constructors

ColorShades.fromAccent(Color accent, {int base = 500, int hueShift = 0, int saturationStepDown = 0, int saturationStepUp = 0, int lightnessStepDown = 8, int lightnessStepUp = 9})
factory
ColorShades.fromAccentHSL(HSLColor accent, {int base = 500, int hueShift = 0, int saturationStepDown = 0, int saturationStepUp = 0, int lightnessStepDown = 8, int lightnessStepUp = 9})
factory
ColorShades.fromMap(Map<int, Color> colors)
factory
ColorShades.raw(Map<int, Color> _colors)
const
ColorShades.sorted(List<Color> colors)
factory

Properties

a double
The alpha channel of this color.
finalinherited
alpha int
The alpha channel of this color in an 8 bit value.
no setteroverride
b double
The blue channel of this color.
finalinherited
blue int
The blue channel of this color in an 8 bit value.
no setteroverride
colorSpace ColorSpace
The color space of this color.
finalinherited
g double
The green channel of this color.
finalinherited
green int
The green channel of this color in an 8 bit value.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hex String

Available on Color, provided by the XColor extension

no setter
hexRGB String

Available on Color, provided by the XColor extension

no setter
keys Iterable
Returns the valid keys for accessing operator[].
no setterinherited
opacity double
The alpha channel of this color as a double.
no setteroverride
r double
The red channel of this color.
finalinherited
red int
The red channel of this color in an 8 bit value.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shade100 Color
no setter
shade200 Color
no setter
shade300 Color
no setter
shade400 Color
no setter
shade50 Color
no setter
shade500 Color
no setter
shade600 Color
no setter
shade700 Color
no setter
shade800 Color
no setter
shade900 Color
no setter
shade950 Color
no setter
value int
A 32 bit value representing this color.
no setteroverride

Methods

computeLuminance() double
Returns a brightness value between 0 for darkest and 1 for lightest.
override
get(int key) Color
getContrastColor([double luminanceContrast = 1]) Color

Available on Color, provided by the ColorExtension extension

lerp(Color a, double t) Color

Available on Color, provided by the XColor extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scaleAlpha(double factor) Color

Available on Color, provided by the ColorExtension extension

toARGB32() int
Returns a 32-bit value representing this color.
inherited
toHex({bool includeHashSign = false, bool includeAlpha = true}) String

Available on Color, provided by the ColorExtension extension

toHSL() HSLColor

Available on Color, provided by the ColorExtension extension

toHSV() HSVColor

Available on Color, provided by the ColorExtension extension

toString() String
A string representation of this object.
inherited
withAlpha(int a) ColorShades
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
override
withBlue(int b) ColorShades
Returns a new color that matches this color with the blue channel replaced with b (which ranges from 0 to 255).
override
withGreen(int g) Color
Returns a new color that matches this color with the green channel replaced with g (which ranges from 0 to 255).
override
withLuminance(double luminance) Color

Available on Color, provided by the ColorExtension extension

withOpacity(double opacity) Color
Returns a new color that matches this color with the alpha channel replaced with the given opacity (which ranges from 0.0 to 1.0).
override
withRed(int r) Color
Returns a new color that matches this color with the red channel replaced with r (which ranges from 0 to 255).
override
withValues({double? alpha, double? red, double? green, double? blue, ColorSpace? colorSpace}) Color
Returns a new color with the provided components updated.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic index) Color
Returns an element of the swatch table.
override

Static Properties

shadeValues List<int>
no setter

Static Methods

shiftHSL(HSLColor hsv, int targetBase, {int base = 500, int hueShift = 0, int saturationStepUp = 0, int saturationStepDown = 0, int lightnessStepUp = 9, int lightnessStepDown = 8}) HSLColor