Skip to main content

Function: rgb()

function rgb(
r,
g,
b): RgbColor;

Creates an RGB color object using normalized channel values from 0 to 1.

Parameters

ParameterTypeDescription
rnumberRed channel value from 0 to 1.
gnumberGreen channel value from 0 to 1.
bnumberBlue channel value from 0 to 1.

Returns

RgbColor

The RGB color object.