-
Couldn't load subscription status.
- Fork 35
-
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 1 reply
-
yes! :D
Beta Was this translation helpful? Give feedback.
All reactions
-
So the interesting thing about HSLuv (and the related HPLuv) is that it takes advantage of the fact that RGB gamuts in CIELUV space are polygons. Below is sRGB (colored), P3 (magenta) and Rec2020 (cyan):
The gamuts of sRGB, Display P3 and Rec 2020 are shown as nested trapezoids in CIELUV color space
This makes it computationally easy to find the maximum Chroma for the given Hue and Lightness, and HSLuv is defined as:
h = lchuv.hl = lchuv.ls = lerp(0, maxChroma(gamutLines, l, h), lchuv.c)
In Turn, HPLuv aims to capture the circle circumscribed in the gamut for a given lightness as the range for Chroma:
h = lchuv.hl = lchuv.lp = lerp(0, maxCommonChroma(gamutLines, l), lchuv.c)
The original color spaces were defined in relationship to sRGB, but given the expansion of CSS to other, wider RGB spaces, it would be interesting to have a HSLuv-type space for each. All that differs between RGB spaces is their pre-computed gamut lines.
Given srgb, display-p3, a98-rgb, rec2020, and prophoto-rgb on one hand, and hsluv and hpluv on the other, that produces 10 different possible color spaces. Hence I think this would work better as a separate project, eg. culori-hsluv, that can be plugged into Culori.
Beta Was this translation helpful? Give feedback.
All reactions
-
(Also the canonical HSLuv color space uses CIELUV under the D65 illuminat, while Culori uses the D50 illuminant.)
Beta Was this translation helpful? Give feedback.