Skip to content

Function: toRgbString() ​

ts
function toRgbString(color): string;

Returns a CSS rgb(r, g, b) string from an RgbColor object.

Parameters ​

ParameterType
colorRgbColor

Returns ​

string

Example ​

ts
toRgbString({ r: 255, g: 102, b: 0 }) // => 'rgb(255, 102, 0)'

Since ​

1.0.0

Released under the MIT License.