Function: getRgb()
ts
function getRgb(color, mode?): object;Defined in: getRgb.ts:14
Get the RGB values for a color.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
color | Color | undefined | the 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,
| Name | Type | Defined in |
|---|---|---|
b | number | getRgb.ts:17 |
g | number | getRgb.ts:17 |
r | number | getRgb.ts:17 |