Function: setRgb()
ts
function setRgb(color, rgb): Color;Defined in: setRgb.ts:12
Set the RGB values for a color to specific values.
Parameters
| Parameter | Type | Description |
|---|---|---|
color | Color | the color to set the values for |
rgb | { b?: number; g?: number; r?: number; } | object containing values for r, g, and b. Each value is optional, any values not provided will not be changed |
rgb.b? | number | - |
rgb.g? | number | - |
rgb.r? | number | - |
Returns
a new color with the new r, g, and b values