Colors class

Contains functions for converting between different color models and manipulating colors. In addition to that, some known colors can be accessed for fast prototyping.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

aliceBlue Vector4
RGBA values for the named CSS color 'aliceblue'.
no setter
antiqueWhite Vector4
RGBA values for the named CSS color 'antiquewhite'.
no setter
aqua Vector4
RGBA values for the named CSS color 'aqua'.
no setter
aquamarine Vector4
RGBA values for the named CSS color 'aquamarine'.
no setter
azure Vector4
RGBA values for the named CSS color 'azure'.
no setter
beige Vector4
RGBA values for the named CSS color 'beige'.
no setter
bisque Vector4
RGBA values for the named CSS color 'bisque'.
no setter
black Vector4
RGBA values for the named CSS color 'black'.
no setter
blanchedAlmond Vector4
RGBA values for the named CSS color 'blanchedalmond'.
no setter
blue Vector4
RGBA values for the named CSS color 'blue'.
no setter
blueViolet Vector4
RGBA values for the named CSS color 'blueviolet'.
no setter
brown Vector4
RGBA values for the named CSS color 'brown'.
no setter
burlyWood Vector4
RGBA values for the named CSS color 'burlywood'.
no setter
cadetBlue Vector4
RGBA values for the named CSS color 'cadetblue'.
no setter
chartreuse Vector4
RGBA values for the named CSS color 'chartreuse'.
no setter
chocolate Vector4
RGBA values for the named CSS color 'chocolate'.
no setter
coral Vector4
RGBA values for the named CSS color 'coral'.
no setter
cornflowerBlue Vector4
RGBA values for the named CSS color 'cornflowerblue'.
no setter
cornsilk Vector4
RGBA values for the named CSS color 'cornsilk'.
no setter
crimson Vector4
RGBA values for the named CSS color 'crimson'.
no setter
cyan Vector4
RGBA values for the named CSS color 'cyan'.
no setter
darkBlue Vector4
RGBA values for the named CSS color 'darkblue'.
no setter
darkCyan Vector4
RGBA values for the named CSS color 'darkcyan'.
no setter
darkGoldenrod Vector4
RGBA values for the named CSS color 'darkgoldenrod'.
no setter
darkGray Vector4
RGBA values for the named CSS color 'darkgray'.
no setter
darkGreen Vector4
RGBA values for the named CSS color 'darkgreen'.
no setter
darkKhaki Vector4
RGBA values for the named CSS color 'darkkhaki'.
no setter
darkMagenta Vector4
RGBA values for the named CSS color 'darkmagenta'.
no setter
darkOliveGreen Vector4
RGBA values for the named CSS color 'darkolivegreen'.
no setter
darkOrange Vector4
RGBA values for the named CSS color 'darkorange'.
no setter
darkOrchid Vector4
RGBA values for the named CSS color 'darkorchid'.
no setter
darkRed Vector4
RGBA values for the named CSS color 'darkred'.
no setter
darkSalmon Vector4
RGBA values for the named CSS color 'darksalmon'.
no setter
darkSeaGreen Vector4
RGBA values for the named CSS color 'darkseagreen'.
no setter
darkSlateBlue Vector4
RGBA values for the named CSS color 'darkslateblue'.
no setter
darkSlateGray Vector4
RGBA values for the named CSS color 'darkslategray'.
no setter
darkTurquoise Vector4
RGBA values for the named CSS color 'darkturquoise'.
no setter
darkViolet Vector4
RGBA values for the named CSS color 'darkviolet'.
no setter
deepPink Vector4
RGBA values for the named CSS color 'deeppink'.
no setter
deepSkyBlue Vector4
RGBA values for the named CSS color 'deepskyblue'.
no setter
dimGray Vector4
RGBA values for the named CSS color 'dimgray'.
no setter
dodgerBlue Vector4
RGBA values for the named CSS color 'dodgerblue'.
no setter
firebrick Vector4
RGBA values for the named CSS color 'firebrick'.
no setter
floralWhite Vector4
RGBA values for the named CSS color 'floralwhite'.
no setter
forestGreen Vector4
RGBA values for the named CSS color 'forestgreen'.
no setter
fuchsia Vector4
RGBA values for the named CSS color 'fuchsia'.
no setter
gainsboro Vector4
RGBA values for the named CSS color 'gainsboro'.
no setter
ghostWhite Vector4
RGBA values for the named CSS color 'ghostwhite'.
no setter
gold Vector4
RGBA values for the named CSS color 'gold'.
no setter
goldenrod Vector4
RGBA values for the named CSS color 'goldenrod'.
no setter
gray Vector4
RGBA values for the named CSS color 'gray'.
no setter
green Vector4
RGBA values for the named CSS color 'green'.
no setter
greenYellow Vector4
RGBA values for the named CSS color 'greenyellow'.
no setter
honeydew Vector4
RGBA values for the named CSS color 'honeydew'.
no setter
hotPink Vector4
RGBA values for the named CSS color 'hotpink'.
no setter
indianRed Vector4
RGBA values for the named CSS color 'indianred'.
no setter
indigo Vector4
RGBA values for the named CSS color 'indigo'.
no setter
ivory Vector4
RGBA values for the named CSS color 'ivory'.
no setter
khaki Vector4
RGBA values for the named CSS color 'khaki'.
no setter
lavender Vector4
RGBA values for the named CSS color 'lavender'.
no setter
lavenderBlush Vector4
RGBA values for the named CSS color 'lavenderblush'.
no setter
lawnGreen Vector4
RGBA values for the named CSS color 'lawngreen'.
no setter
lemonChiffon Vector4
RGBA values for the named CSS color 'lemonchiffon'.
no setter
lightBlue Vector4
RGBA values for the named CSS color 'lightblue'.
no setter
lightCoral Vector4
RGBA values for the named CSS color 'lightcoral'.
no setter
lightCyan Vector4
RGBA values for the named CSS color 'lightcyan'.
no setter
lightGoldenrodYellow Vector4
RGBA values for the named CSS color 'lightgoldenrodyellow'.
no setter
lightGray Vector4
RGBA values for the named CSS color 'lightgray'.
no setter
lightGreen Vector4
RGBA values for the named CSS color 'lightgreen'.
no setter
lightPink Vector4
RGBA values for the named CSS color 'lightpink'.
no setter
lightSalmon Vector4
RGBA values for the named CSS color 'lightsalmon'.
no setter
lightSeaGreen Vector4
RGBA values for the named CSS color 'lightseagreen'.
no setter
lightSkyBlue Vector4
RGBA values for the named CSS color 'lightskyblue'.
no setter
lightSlateGray Vector4
RGBA values for the named CSS color 'lightslategray'.
no setter
lightSteelBlue Vector4
RGBA values for the named CSS color 'lightsteelblue'.
no setter
lightYellow Vector4
RGBA values for the named CSS color 'lightyellow'.
no setter
lime Vector4
RGBA values for the named CSS color 'lime'.
no setter
limeGreen Vector4
RGBA values for the named CSS color 'limegreen'.
no setter
linen Vector4
RGBA values for the named CSS color 'linen'.
no setter
magenta Vector4
RGBA values for the named CSS color 'magenta'.
no setter
maroon Vector4
RGBA values for the named CSS color 'maroon'.
no setter
mediumAquamarine Vector4
RGBA values for the named CSS color 'mediumaquamarine'.
no setter
mediumBlue Vector4
RGBA values for the named CSS color 'mediumblue'.
no setter
mediumOrchid Vector4
RGBA values for the named CSS color 'mediumorchid'.
no setter
mediumPurple Vector4
RGBA values for the named CSS color 'mediumpurple'.
no setter
mediumSeaGreen Vector4
RGBA values for the named CSS color 'mediumseagreen'.
no setter
mediumSlateBlue Vector4
RGBA values for the named CSS color 'mediumslateblue'.
no setter
mediumSpringGreen Vector4
RGBA values for the named CSS color 'mediumspringgreen'.
no setter
mediumTurquoise Vector4
RGBA values for the named CSS color 'mediumturquoise'.
no setter
mediumVioletRed Vector4
RGBA values for the named CSS color 'mediumvioletred'.
no setter
midnightBlue Vector4
RGBA values for the named CSS color 'midnightblue'.
no setter
mintCream Vector4
RGBA values for the named CSS color 'mintcream'.
no setter
mistyRose Vector4
RGBA values for the named CSS color 'mistyrose'.
no setter
moccasin Vector4
RGBA values for the named CSS color 'moccasin'.
no setter
RGBA values for the named CSS color 'navajowhite'.
no setter
RGBA values for the named CSS color 'navy'.
no setter
oldLace Vector4
RGBA values for the named CSS color 'oldlace'.
no setter
olive Vector4
RGBA values for the named CSS color 'olive'.
no setter
oliveDrab Vector4
RGBA values for the named CSS color 'olivedrab'.
no setter
orange Vector4
RGBA values for the named CSS color 'orange'.
no setter
orangeRed Vector4
RGBA values for the named CSS color 'orangered'.
no setter
orchid Vector4
RGBA values for the named CSS color 'orchid'.
no setter
paleGoldenrod Vector4
RGBA values for the named CSS color 'palegoldenrod'.
no setter
paleGreen Vector4
RGBA values for the named CSS color 'palegreen'.
no setter
paleTurquoise Vector4
RGBA values for the named CSS color 'paleturquoise'.
no setter
paleVioletRed Vector4
RGBA values for the named CSS color 'palevioletred'.
no setter
papayaWhip Vector4
RGBA values for the named CSS color 'papayawhip'.
no setter
peachPuff Vector4
RGBA values for the named CSS color 'peachpuff'.
no setter
peru Vector4
RGBA values for the named CSS color 'peru'.
no setter
pink Vector4
RGBA values for the named CSS color 'pink'.
no setter
plum Vector4
RGBA values for the named CSS color 'plum'.
no setter
powderBlue Vector4
RGBA values for the named CSS color 'powderblue'.
no setter
purple Vector4
RGBA values for the named CSS color 'purple'.
no setter
red Vector4
RGBA values for the named CSS color 'red'.
no setter
rosyBrown Vector4
RGBA values for the named CSS color 'rosybrown'.
no setter
royalBlue Vector4
RGBA values for the named CSS color 'royalblue'.
no setter
saddleBrown Vector4
RGBA values for the named CSS color 'saddlebrown'.
no setter
salmon Vector4
RGBA values for the named CSS color 'salmon'.
no setter
sandyBrown Vector4
RGBA values for the named CSS color 'sandybrown'.
no setter
seaGreen Vector4
RGBA values for the named CSS color 'seagreen'.
no setter
seaShell Vector4
RGBA values for the named CSS color 'seashell'.
no setter
sienna Vector4
RGBA values for the named CSS color 'sienna'.
no setter
silver Vector4
RGBA values for the named CSS color 'silver'.
no setter
skyBlue Vector4
RGBA values for the named CSS color 'skyblue'.
no setter
slateBlue Vector4
RGBA values for the named CSS color 'slateblue'.
no setter
slateGray Vector4
RGBA values for the named CSS color 'slategray'.
no setter
snow Vector4
RGBA values for the named CSS color 'snow'.
no setter
springGreen Vector4
RGBA values for the named CSS color 'springgreen'.
no setter
steelBlue Vector4
RGBA values for the named CSS color 'steelblue'.
no setter
tan Vector4
RGBA values for the named CSS color 'tan'.
no setter
teal Vector4
RGBA values for the named CSS color 'teal'.
no setter
thistle Vector4
RGBA values for the named CSS color 'thistle'.
no setter
tomato Vector4
RGBA values for the named CSS color 'tomato'.
no setter
transparent Vector4
RGBA values for the named CSS color 'transparent'.
no setter
turquoise Vector4
RGBA values for the named CSS color 'turquoise'.
no setter
violet Vector4
RGBA values for the named CSS color 'violet'.
no setter
wheat Vector4
RGBA values for the named CSS color 'wheat'.
no setter
white Vector4
RGBA values for the named CSS color 'white'.
no setter
whiteSmoke Vector4
RGBA values for the named CSS color 'whitesmoke'.
no setter
yellow Vector4
RGBA values for the named CSS color 'yellow'.
no setter
yellowGreen Vector4
RGBA values for the named CSS color 'yellowgreen'.
no setter

Static Methods

alphaBlend(Vector4 foreground, Vector4 background, Vector4 result) → void
Blend the foreground color over background color and store the color in result.
fromHexString(String value, Vector4 result) → void
Convert the color as a string in the format '#FF0F00', '#FFFF0F00', '#FF0' or '#FFF0' (with or without a leading '#', case insensitive) to the corresponding color value and store it in result. The first group is treated as the alpha channel if a value with four groups is passed.
fromRgba(int r, int g, int b, int a, Vector4 result) → void
Convert a color with r, g, b and a component between 0 and 255 to a color with values between 0.0 and 1.0 and store it in result.
gammaToLinear(Vector4 gammaColor, Vector4 linearColor, [double gamma = 2.2]) → void
Convert gammaColor from gamma space into linear color space and store the result in linearColor. It is possible to specify a optional gamma, the default value is 2.2.
hslToRgb(Vector4 hslColor, Vector4 rgbColor) → void
Convert hslColor from hue, saturation, and lightness (HSL) color model to the RGB color model and store it in rgbColor.
hsvToRgb(Vector4 hsvColor, Vector4 rgbColor) → void
Convert hsvColor from hue, saturation, and value (HSV) color model to the RGB color model and store it in rgbColor.
linearToGamma(Vector4 linearColor, Vector4 gammaColor, [double gamma = 2.2]) → void
Convert linearColor from linear space into gamma color space and store the result in gammaColor. It is possible to specify a optional gamma, the default value is 2.2.
rgbToHsl(Vector4 rgbColor, Vector4 hslColor) → void
Convert rgbColor from rgb color model to the hue, saturation, and lightness (HSL) color model and store it in hslColor.
rgbToHsv(Vector4 rgbColor, Vector4 hsvColor) → void
Convert rgbColor from rgb color model to the hue, saturation, and value (HSV) color model and store it in hsvColor.
toGrayscale(Vector4 input, Vector4 result) → void
Convert a input color to a gray scaled color and store it in result.
toHexString(Vector4 input, {bool alpha = false, bool short = false}) String
Convert a input color to a hex string without a leading '#'. To include the alpha channel, set alpha to true, it is false by default. If short is true, the resulting hex string might also be a short version, like #ff0 (default false).