Library

Color3

table

Constructor and helpers for the Color3 datatype (RGB without alpha).

Functions

4

#Color3.new(red: number, green: number, blue: number) → Color3

since 1.6.9-2-alpha

Returns a new Color3 with the specified normalized R, G, B values

Parameters

rednumber

Normalized red value, ranging from 0 to 1. Defaults to 0

greennumber

Normalized green value, ranging from 0 to 1. Defaults to 0

bluenumber

Normalized blue value, ranging from 0 to 1. Defaults to 0

#Color3.fromRGB(red: number, green: number, blue: number) → Color3

since 1.6.9-2-alpha

Returns a new Color3 with the specified R, G, B values

Parameters

rednumber

Red value, ranging from 0 to 255. Defaults to 0

greennumber

Green value, ranging from 0 to 255. Defaults to 0

bluenumber

Blue value, ranging from 0 to 255. Defaults to 0

#Color3.fromHSV(hue: number, saturation: number, value: number) → Color3

since 1.6.9-2-alpha

Returns a new Color3 with the specified normalized H, S, V values

Parameters

huenumber

Normalized hue value, ranging from 0 to 1. Defaults to 0

saturationnumber

Normalized saturation value, ranging from 0 to 1. Defaults to 0

valuenumber

Normalized value, ranging from 0 to 1. Defaults to 0

#Color3.fromHex(hex: string) → Color3

since 1.6.9-2-alpha

Returns a new Color3 from a hex colour string, e.g. "#FF5733" or "FF5733".

Parameters

hexstring

The hex colour string.