Linear ProPhoto
The Linear ProPhoto color space is registered in Color
by default
Properties
Name: prophoto-rgb-linear
White Point: D50 / 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.
The Linear ProPhoto space is the same as ProPhoto 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 ProPhoto is not supported via the CSS spec and the parser input and string output only supports the color()
function format using the custom name --prophoto-rgb-linear
:
color(--prophoto-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("prophoto-rgb-linear", [0, 0, 0], 1)
The string representation of the color object and the default string output will be in the color(--prophoto-rgb-linear r g b / a)
form.
>>> Color("prophoto-rgb-linear", [0.52928, 0.09837, 0.01688])
color(--prophoto-rgb-linear 0.52928 0.09837 0.01688 / 1)
>>> Color("prophoto-rgb-linear", [0.6535, 0.42702, 0.06115]).to_string()
'color(--prophoto-rgb-linear 0.6535 0.42702 0.06115)'
Registering
from coloraide import Color as Base
from coloraide.spaces.prophoto_rgb_linear import ProPhotoRGBLinear
class Color(Base): ...
Color.register(ProPhotoRGBLinear())