Linear sRGB
The Linear sRGB color space is registered in Color
by default
Properties
Name: srgb-linear
White Point: D65 / 2˚
Coordinates:
Name | Range* |
---|---|
r | [0, 1] |
g | [0, 1] |
b | [0, 1] |
* Range denotes in gamut colors, but the color space supports an extended range beyond the gamut.
Figure 1. CIE 1931 xy Chromaticity – sRGB Chromaticities
The sRGB Linear space is the same as sRGB except that the transfer function is linear-light (there is no gamma-encoding).
Channel Aliases
Channels | Aliases |
---|---|
r | red |
g | green |
b | blue |
Inputs/Output
Parsed input and string output formats support all valid CSS forms:
color(srgb-linear r g b / a) // Color function
When manually creating a color via raw data or specifying a color space as a parameter in a function, the color space name is always used:
Color("srgb-linear", [0, 0, 0], 1)
The string representation of the color object and the default string output will be in the color(srgb-linear r g b / a)
form.
>>> Color("srgb", [1, 0, 0])
color(srgb 1 0 0 / 1)
>>> Color("srgb", [1, 0.37626, 0]).to_string()
'rgb(255 95.946 0)'
Registering
from coloraide import Color as Base
from coloraide.spaces.srgb_linear import sRGBLinear
class Color(Base): ...
Color.register(sRGB())