Linear A98 RGB
The Linear A98 RGB color space is registered in Color
by default
Properties
Name: a98-rgb-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 – Adobe® RGB 1998 Chromaticities
The Linear A98 RGB space is the same as A98 RGB except that the transfer function is linear-light (there is no gamma-encoding).
Channel Aliases
Channels | Aliases |
---|---|
r | red |
g | green |
b | blue |
Input/Output
Linear A98 RGB is not supported via the CSS spec and the parser input and string output only supports the color()
function format using the custom name --a98-rgb-linear
:
color(--a98-rgb-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("a98-rgb-linear", [0, 0, 0], 1)
The string representation of the color object and the default string output will be in the color(--a98-rgb-linear r g b / a)
form.
>>> Color("a98-rgb", [0.71513, 0, 0])
color(a98-rgb 0.71513 0 0 / 1)
>>> Color("a98-rgb-linear", [0.82231, 0.37626, 0.01549]).to_string()
'color(--a98-rgb-linear 0.82231 0.37626 0.01549)'
Registering
from coloraide import Color as Base
from coloraide.spaces.a98_rgb_linear import A98RGBLinear
class Color(Base): ...
Color.register(A98RGBLinear())