Datatype · Userdata

Color3

userdatasince 1.6.9-2-alpha

An RGB colour. Note that, unlike Roblox, the R, G and B properties are exposed in the 0-255 range rather than 0-1.

Properties

3
NameTypeAccessDescription
Rnumberread

The red channel, as an integer from 0 to 255.

since 1.6.9-2-alpha
Gnumberread

The green channel, as an integer from 0 to 255.

since 1.6.9-2-alpha
Bnumberread

The blue channel, as an integer from 0 to 255.

since 1.6.9-2-alpha

Methods

3

#Color3:Lerp(color: Color3, alpha: number) → Color3

since 1.6.9-2-alpha

Returns a Color3 interpolated between this colour and color by the fraction alpha.

Parameters

colorColor3

The colour to interpolate towards.

alphanumber

The blend factor, between 0 and 1.

#Color3:ToHSV() → number, number, number

since 1.6.9-2-alpha

Returns the hue, saturation and value of the colour, each as a number from 0 to 1.

#Color3:ToHex() → string

since 1.6.9-2-alpha

Returns the colour as a hex string (e.g. "FF5733").