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
no setter
antiqueWhite → Vector4
no setter
aqua → Vector4
no setter
aquamarine → Vector4
no setter
azure → Vector4
no setter
beige → Vector4
no setter
bisque → Vector4
no setter
black → Vector4
no setter
blanchedAlmond → Vector4
no setter
blue → Vector4
no setter
blueViolet → Vector4
no setter
brown → Vector4
no setter
burlyWood → Vector4
no setter
cadetBlue → Vector4
no setter
chartreuse → Vector4
no setter
chocolate → Vector4
no setter
coral → Vector4
no setter
cornflowerBlue → Vector4
no setter
cornsilk → Vector4
no setter
crimson → Vector4
no setter
cyan → Vector4
no setter
darkBlue → Vector4
no setter
darkCyan → Vector4
no setter
darkGoldenrod → Vector4
no setter
darkGray → Vector4
no setter
darkGreen → Vector4
no setter
darkKhaki → Vector4
no setter
darkMagenta → Vector4
no setter
darkOliveGreen → Vector4
no setter
darkOrange → Vector4
no setter
darkOrchid → Vector4
no setter
darkRed → Vector4
no setter
darkSalmon → Vector4
no setter
darkSeaGreen → Vector4
no setter
darkSlateBlue → Vector4
no setter
darkSlateGray → Vector4
no setter
darkTurquoise → Vector4
no setter
darkViolet → Vector4
no setter
deepPink → Vector4
no setter
deepSkyBlue → Vector4
no setter
dimGray → Vector4
no setter
dodgerBlue → Vector4
no setter
firebrick → Vector4
no setter
floralWhite → Vector4
no setter
forestGreen → Vector4
no setter
fuchsia → Vector4
no setter
gainsboro → Vector4
no setter
ghostWhite → Vector4
no setter
gold → Vector4
no setter
goldenrod → Vector4
no setter
gray → Vector4
no setter
green → Vector4
no setter
greenYellow → Vector4
no setter
honeydew → Vector4
no setter
hotPink → Vector4
no setter
indianRed → Vector4
no setter
indigo → Vector4
no setter
ivory → Vector4
no setter
khaki → Vector4
no setter
lavender → Vector4
no setter
lavenderBlush → Vector4
no setter
lawnGreen → Vector4
no setter
lemonChiffon → Vector4
no setter
lightBlue → Vector4
no setter
lightCoral → Vector4
no setter
lightCyan → Vector4
no setter
lightGoldenrodYellow → Vector4
no setter
lightGray → Vector4
no setter
lightGreen → Vector4
no setter
lightPink → Vector4
no setter
lightSalmon → Vector4
no setter
lightSeaGreen → Vector4
no setter
lightSkyBlue → Vector4
no setter
lightSlateGray → Vector4
no setter
lightSteelBlue → Vector4
no setter
lightYellow → Vector4
no setter
lime → Vector4
no setter
limeGreen → Vector4
no setter
linen → Vector4
no setter
magenta → Vector4
no setter
maroon → Vector4
no setter
mediumAquamarine → Vector4
no setter
mediumBlue → Vector4
no setter
mediumOrchid → Vector4
no setter
mediumPurple → Vector4
no setter
mediumSeaGreen → Vector4
no setter
mediumSlateBlue → Vector4
no setter
mediumSpringGreen → Vector4
no setter
mediumTurquoise → Vector4
no setter
mediumVioletRed → Vector4
no setter
midnightBlue → Vector4
no setter
mintCream → Vector4
no setter
mistyRose → Vector4
no setter
moccasin → Vector4
no setter
no setter
no setter
oldLace → Vector4
no setter
olive → Vector4
no setter
oliveDrab → Vector4
no setter
orange → Vector4
no setter
orangeRed → Vector4
no setter
orchid → Vector4
no setter
paleGoldenrod → Vector4
no setter
paleGreen → Vector4
no setter
paleTurquoise → Vector4
no setter
paleVioletRed → Vector4
no setter
papayaWhip → Vector4
no setter
peachPuff → Vector4
no setter
peru → Vector4
no setter
pink → Vector4
no setter
plum → Vector4
no setter
powderBlue → Vector4
no setter
purple → Vector4
no setter
red → Vector4
no setter
rosyBrown → Vector4
no setter
royalBlue → Vector4
no setter
saddleBrown → Vector4
no setter
salmon → Vector4
no setter
sandyBrown → Vector4
no setter
seaGreen → Vector4
no setter
seaShell → Vector4
no setter
sienna → Vector4
no setter
silver → Vector4
no setter
skyBlue → Vector4
no setter
slateBlue → Vector4
no setter
slateGray → Vector4
no setter
snow → Vector4
no setter
springGreen → Vector4
no setter
steelBlue → Vector4
no setter
tan → Vector4
no setter
teal → Vector4
no setter
thistle → Vector4
no setter
tomato → Vector4
no setter
transparent → Vector4
no setter
turquoise → Vector4
no setter
violet → Vector4
no setter
wheat → Vector4
no setter
white → Vector4
no setter
whiteSmoke → Vector4
no setter
yellow → Vector4
no setter
yellowGreen → Vector4
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).