Datatype · Userdata

Color4

userdatasince 1.6.9-2-alpha

An RGBA colour. A Color3 with an added alpha (opacity) channel. The R, G, B and A properties are exposed in the 0-255 range. This is a Madius-specific datatype with no direct Roblox equivalent.

Properties

4
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
Anumberread

The alpha (opacity) channel, as an integer from 0 to 255.

since 1.6.9-2-alpha

Methods

3

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

since 1.6.9-2-alpha

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

Parameters

colorColor4

The colour to interpolate towards.

alphanumber

The blend factor, between 0 and 1.

#Color4:ToHSVA() → number, number, number, number

since 1.6.9-2-alpha

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

#Color4:ToHex() → string

since 1.6.9-2-alpha

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