Skip to content

Function: getRgb()

ts
function getRgb(color, mode?): object;

Defined in: getRgb.ts:14

Get the RGB values for a color.

Parameters

ParameterTypeDefault valueDescription
colorColorundefinedthe color to get the value from
mode"decimal" | "percentage" | "raw""decimal"the mode to return the values in, if no valid mode is provided it always returns decimal * decimal (default): each color component represented as an integer between 0-255. * percentage: each color component represented as a percentage * raw. Raw is the internal color object values, with no rounding

Returns

object

an object containing the RGB values,

NameTypeDefined in
bnumbergetRgb.ts:17
gnumbergetRgb.ts:17
rnumbergetRgb.ts:17