Readonly
aAlpha/transparent component. . 0 = transparent
Readonly
bBlue component.
Readonly
gGreen component.
Readonly
rRed component. Should be in the range [0, 1].
Static
blackStatic
blueStatic
clayStatic
grayStatic
greenStatic
orangeStatic
purpleStatic
redStatic
transparentStatic
whiteStatic
yellowConverts to (hue, saturation, value). See also https://en.wikipedia.org/wiki/HSL_and_HSV#General_approach
The resultant hue is represented in radians and is thus in .
true if this
and other
are approximately equal.
If fractionTo
is not in the range , it will be clamped to the nearest number
in that range. For example, a.mix(b, -1)
is equivalent to a.mix(b, 0)
.
a color fractionTo
of the way from this color to other
.
Color4.ofRGB(1, 0, 0).mix(Color4.ofRGB(0, 1, 0), 0.1) // -> Color4(0.9, 0.1, 0)
Returns the relative luminance of this color in the sRGB color space.
Ignores the alpha component.
Static
averageStatic
contrastReturns the contrast ratio
between colorA
and colorB
.
Static
fromHSVStatic
fromStatic
fromRGBVectorStatic
fromStatic
ofRGBStatic
ofRGBAGenerated using TypeDoc
Represents a color.
Example