Fix a bug in color conversion

The linear space corresponding to oklab is oklab, not srgb-linear.
This commit is contained in:
Matthias Clasen 2024-06-02 08:45:09 -04:00
parent bfe8adbee4
commit 3d5fce1b9f

View File

@ -321,7 +321,8 @@ convert_linear_to_linear (GtkCssColor *output,
GtkCssColorSpace dest_linear;
float v[4];
if (dest == GTK_CSS_COLOR_SPACE_OKLCH)
if (dest == GTK_CSS_COLOR_SPACE_OKLCH ||
dest == GTK_CSS_COLOR_SPACE_OKLAB)
dest_linear = GTK_CSS_COLOR_SPACE_OKLAB;
else
dest_linear = GTK_CSS_COLOR_SPACE_SRGB_LINEAR;