Skip to content

Linear Display P3

The Linear Display P3 color space is registered in Color by default

Properties

Name: display-p3-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.

Display P3

CIE 1931 xy Chromaticity – Display P3 Chromaticities

The Linear Display P3 space is the same as Display P3 except that the transfer function is linear-light (there is no gamma-encoding).

Learn about Display P3

Channel Aliases

Channels Aliases
r red
g green
b blue

Input/Output

Linear Display P3 is not supported via the CSS spec and the parser input and string output only supports the color() function format using the custom name --display-p3-linear:

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

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

>>> Color("display-p3-linear", [0.82246, 0.03319, 0.01708])
color(--display-p3-linear 0.82246 0.03319 0.01708 / 1)
>>> Color("display-p3-linear", [0.88926, 0.39697, 0.04432]).to_string()
'color(--display-p3-linear 0.88926 0.39697 0.04432)'

Registering

from coloraide import Color as Base
from coloraide.spaces.display_p3_linear import DisplayP3

class Color(Base): ...

Color.register(DisplayP3Linear())