Color
Global Methods
The following color methods are accessible via the PIXEL
global table:
Color PIXEL.OffsetColor( Color, number )
Offsets the RGB components of the colour by the given amount.
Color PIXEL.GetRainbowColor()
Provides a colour which cycles through the rainbow.
boolean PIXEL.IsColorEqualTo( Color, Color )
Determines whether two colors are equal to one another.
boolean PIXEL.IsColorLight( Color )
Determines whether a color is considered light (greater than 0.5 lightness).
string PIXEL.ColorToHex( Color )
Converts a color into a hexadecimal string.
number, number, number PIXEL.ColorToHSL( Color )
Converts a color to its HSL (Hue, Saturation, Lightness) representation.
Color PIXEL.HexToColor( string )
Converts a hexadecimal string to a color.
Color Extension Methods
The Color (opens in a new tab) metatable is extended by PIXEL UI to include the following methods:
Color Color:Offset( number )
Offsets the RGB components of the color the method was called on by the given amount.
Color Color:Lerp( number, number )
Performs linear interpolation starting from the color the method was called on.