Colors class Null safety

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.
read-onlyinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

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

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).