@add-on-hlapi-sdk / Color
Class: Color
Represents a color in a defined RGB colorspace. Value is immutable – to change, create a new Color object.
Hierarchy
ProxyLiveObject
↳
Color
Table of contents
Accessors
Methods
Accessors
alpha
• get
alpha(): number
The alpha channel in range from 0 - 1.
Returns
number
blue
• get
blue(): number
The blue channel in range from 0 - 1.
Returns
number
colorSpace
• get
colorSpace(): sRGB
This color's color space. Currently only sRGB is supported.
Returns
green
• get
green(): number
The green channel in range from 0 - 1.
Returns
number
red
• get
red(): number
The red channel in range from 0 - 1.
Returns
number
Methods
getHex
▸ getHex(): string
Get the color in 8-digit hex "#RRGGBBAA" format.
Returns
string