Tries to parse an object in forms: {r,g,b}, {red,green,blue}. Uses 'opacity', 'space' and 'unit' fields where available.
{r,g,b}
{red,green,blue}
If 'units' is not specified, it tries to guess if it's relative (0..1) or 8-bit (0..255).
Normalises to an Rgb structure if it can, or returns an error.
Tries to parse an object in forms:
{r,g,b}
,{red,green,blue}
. Uses 'opacity', 'space' and 'unit' fields where available.If 'units' is not specified, it tries to guess if it's relative (0..1) or 8-bit (0..255).
Normalises to an Rgb structure if it can, or returns an error.