Types

Colors

Color3 constructors and the Colorx helpers.

Color3

A colour with fields R, G, B, each from 0 to 1.

Color3.new(r, g, b)

From values between 0 and 1. Missing values count as 0.

Color3.fromRGB(r, g, b)

From values between 0 and 255.

Color3.fromHex(hex)

From a hex string like "#ff8800" or "ff8800".

Color3.fromHSV(h, s, v)

From hue, saturation and value, each from 0 to 1.

local red = Color3.fromRGB(255, 0, 0)
local orange = Color3.fromHex("#ff8800")
local sky = Color3.fromHSV(0.58, 0.6, 1)

Colorx

Colour helpers built on Color3.

Colorx.hsv(h, s, v)

Like Color3.fromHSV. The hue wraps around, so any number works.

Colorx.rainbow(speed = 0.25, offset = 0)

A fully saturated colour that cycles over time. Call it every frame. offset shifts the hue so several things can show different colours.

Colorx.lerp(a, b, t)

Blends two colours.

Colorx.hex(hex)

Same as Color3.fromHex.

Colorx.health(fraction)

Returns red at 0 and green at 1, for health bars. The value is clamped to 0 to 1.

RunService.RenderStepped:Connect(function()
  line.Color = Colorx.rainbow(0.5)
end)