srgb
srgb()A FLOAT_COLOR attribute as sRGB RGBA float32 colors.
Blender stores color attributes as linear colors. The values of this array are sRGB, and are converted to linear when they are stored, and from linear when they are read as bob["name", db.srgb]. Alpha isn’t converted. Results of math on an srgb array are also srgb arrays, so that they are still converted when stored, unless the math mixes in another kind of typed array such as db.color.
Read colors as bob["name", db.srgb] rather than bob["name"].view(db.srgb), which would label linear values as sRGB without converting them.
Methods
| Name | Description |
|---|---|
| fill | Fill the array with a scalar value and sync to Blender. |
| partition | Partition the array in-place and sync to Blender. |
| put | Set values at the given flat indices and sync to Blender. |
| sort | Sort the array in-place and sync to Blender. |
fill
srgb.fill(value)Fill the array with a scalar value and sync to Blender.
partition
srgb.partition(*args, **kwargs)Partition the array in-place and sync to Blender.
put
srgb.put(*args, **kwargs)Set values at the given flat indices and sync to Blender.
sort
srgb.sort(*args, **kwargs)Sort the array in-place and sync to Blender.