class
Color
Public
Constructors
Color
Methods
GetAsRgba
Returns the color as a 32-bit value in RGBA order.
GetAsArgb
Returns the color as a 32-bit value in ARGB order.
GetAsBgra
Returns the color as a 32-bit value in BGRA order.
GetAsAbgr
Returns the color as a 32-bit value in ABGR order.
GetHsb
Convert the current color to hue, saturation and brightness values.
- outHue
- Output hue value, scaled to the [0,1] range.
- outSaturation
- Output saturation level, [0,1].
- outBrightness
- Output brightness level, [0,1].
GetLinear
Converts the current color from gamma to linear space and returns the result.
GetGamma
Converts the current color from linear to gamma space and returns the result.
Saturate
Clamps color value to the range [0, 1].
SaturateCopy
Clamps colour value to the range [0, 1].
Returned saturated color as a copy.
Ptr
Pointer accessor for direct copying.
Ptr
Pointer accessor for direct copying.
staticFromRgba
Creates a color value from a 32-bit value that encodes a RGBA color.
staticFromArgb
Creates a color value from a 32-bit value that encodes a ARGB color.
staticFromBgra
Creates a color value from a 32-bit value that encodes a BGRA color.
staticFromAbgr
Creates a color value from a 32-bit value that encodes a ABGR color.
staticFromHSB
Creates a color value from hue, saturation and brightness.
- hue
- Hue value, scaled to the [0,1] range.
- saturation
- Saturation level, [0,1].
- brightness
- Brightness level, [0,1].
- alpha
- Transparency level, [0,1].
staticFromHSL
Creates an RGBA color from a HSL(A) color.
- hue
- Hue value, scaled to the [0,1] range.
- saturation
- Saturation level, [0,1].
- lightness
- Lightness level, [0,1].
- alpha
- Transparency level, [0,1].
staticLerp
Linearly interpolates between the two colors using . t should be in [0, 1] range, where t = 0 corresponds to the left color, while t = 1 corresponds to the right color.
staticLerp
Linearly interpolates between the two colors using . t should be in [0, 255] range, where t = 0 corresponds to the left color, while t = 1 corresponds to the right color.
Operates directly on 8-bit per channel encoded color instead of on floating point values.