Class
Color
:0-255 RGBA color.
group
Math
r
: numberRed (0-255.
g
: numberGreen (0-255).
b
: numberBlue (0-255).
fromArray
(arr: number[]) => ColorfromHex
(hex: string | number) => ColorCreate color from hex string or literal.
Color.fromHex(0xfcef8d)
Color.fromHex("#5ba675")
Color.fromHex("d46eb3")
since
v3000.0
fromHSL
(h: number, s: number, l: number) => ColorRED
: ColorGREEN
: ColorBLUE
: ColorYELLOW
: ColorMAGENTA
: ColorCYAN
: ColorWHITE
: ColorBLACK
: Colorclone
() => Colorlighten
(a: number) => ColorLighten the color (adds RGB by n).
darken
(a: number) => ColorDarkens the color (subtracts RGB by n).
invert
() => Colormult
(other: Color) => Colorlerp
(dest: Color, t: number) => ColorLinear interpolate to a destination color.
since
v3000.0
toHSL
() => [number, number, number]Convert color into HSL format.
since
v3001.0
eq
(other: Color) => booleantoHex
() => stringReturn the hex string of color.
since
v3000.0
toArray
() => Array<number>Return the color converted to an array.
since
v3001.0