# srgb

Python reference for `nagasim.appearance.srgb`. Provisional: it may change between minor versions, see [Appearance](../../appearance.md).

`nagasim.appearance.srgb`

```python
srgb(color: str)
```

The sRGB channels of a colour `#RRGGBB`, each 0 to 1.

Every colour of a look is sRGB. A glTF base colour, and most renderers' shader inputs, are
linear: pass the result to `linear_rgb`, as `linear_rgb(srgb(c))`.

Parameters
----------
color : str
    A colour `#RRGGBB`.

Returns
-------
tuple of float
    (red, green, blue), still sRGB-encoded.

Raises
------
ValueError
    When *color* is not a colour `#RRGGBB`.

See Also
--------
nagasim.appearance.linear_rgb : The linear components a glTF base colour takes.
nagasim.appearance.material : The material whose colour this reads.

Examples
--------
>>> from nagasim.appearance import srgb
>>> srgb("#FF8000")
(1.0, 0.5019607843137255, 0.0)
