Skip to content

Linear REC. 2020

The Linear Rec. 2100 color space is registered in Color by default

Properties

Name: rec2100-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.

Rec. 2120

CIE 1931 xy Chromaticity – Rec. 2020 Chromaticities (the same as Rec. 2100)

The Linear Rec. 2100 space is the same as Linear Rec. 2100 and is essentially an alias required by the CSS HDR specification.

Learn about REC.2020

Channel Aliases:**

Channels Aliases
r red
g green
b blue

Input/Output

Parsed input and string output formats support all valid CSS forms:

color(rec2020-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("rec2020-linear", [0, 0, 0], 1)

The string representation of the color object and the default string output will be in the color(rec2020-linear r g b / a) form.

>>> Color("rec2100-linear", [0.6274, 0.0691, 0.01639])
color(rec2100-linear 0.6274 0.0691 0.01639 / 1)
>>> Color("rec2100-linear", [0.7513, 0.41509, 0.04951]).to_string()
'color(rec2100-linear 0.7513 0.41509 0.04951)'

Registering

from coloraide import Color as Base
from coloraide.spaces.rec2100_linear import Rec2100Linear

class Color(Base): ...

Color.register(Rec2100Linear())