Color functions
Free functions you can call directly in sprite code.
colorNumToRgb
Section titled “colorNumToRgb”colorNumToRgb(num: number | string): ColorCreate a Color from a Scratch color number.
Delegates to Color.num
hex(hex: string): ColorCreate a Color from a hex string.
Delegates to Color.hex
rgb(r: number, g: number, b: number): ColorCreate a Color from red, green, and blue components.
Delegates to Color.rgb