Documentation / @ripl/3d / resolveColorUnitRGB
Function: resolveColorUnitRGB() ​
resolveColorUnitRGB(
value,fallback?):ColorUnitRGB
Defined in: 3d/src/core/color.ts:58
Parses a CSS colour straight into unit-range RGB, falling back to fallback when unparseable.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
value | string | Any colour string @ripl/core can parse. |
fallback | ColorUnitRGB | The colour to return when value cannot be parsed. |
Returns ​
The colour as unit-range RGB.