Lab D65
The Lab D65 color space is registered in Color
by default
Properties
Name: lab-d65
White Point: D65 / 2˚
Coordinates:
Name | Range* |
---|---|
l | [0, 100] |
a | [-130, 130] |
b | [-130, 130] |
* Space is not bound to the range and is only used as a reference to define percentage inputs/outputs in relation to the Display P3 color space.
CIELab D65 is the same as CIELab except it uses a D65 white point.
Channel Aliases
Channels | Aliases |
---|---|
l | lightness |
a | |
b |
Input/Output
As a D65 variant of CIELab is not currently supported in the CSS spec, the parsed input and string output formats use the color()
function format using the custom name --lab-d65
:
color(--lab-d65 l a 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("lab-d65", [0, 0, 0], 1)
The string representation of the color object and the default string output use the color(--lab-d65 l a b / a)
form.
>>> Color("lab-d65", [53.237, 80.09, 67.203])
color(--lab-d65 53.237 80.09 67.203 / 1)
>>> Color("lab-d65", [74.934, 23.927, 78.953]).to_string()
'color(--lab-d65 74.934 23.927 78.953)'
Registering
from coloraide import Color as Base
from coloraide.spaces.lab_d65 import LabD65
class Color(Base): ...
Color.register(LabD65())