Skip to content
Untitled Sandbox - Developer Documentation
docs/types/Color

Color

A color made from red, green and blue values, which you create with math3d.color.rgb or math3d.color.hex.

Fields

rnumber
gnumber
bnumber

Color:to_hex

method

Gives the color back as text, like "#RRGGBB".

Color:to_hex() -> string
example
print(door.color:to_hex())

Use it forshowing a color code in a message, or saving a color as text.

Color:to_hsv

method

Gives the hue in degrees, then the saturation and value from 0 to 1.

Color:to_hsv() -> (number, number, number)
example
local hue, saturation, value = door.color:to_hsv()

Use it forrainbow effects, or making a color lighter or darker.

↑ ↓ moveEnter openEsc close