render/color: add wlr_color_primaries_to_xyz()

This commit is contained in:
Simon Ser 2025-01-27 18:04:02 +01:00
parent d8ad4809fc
commit 156201fe71
3 changed files with 68 additions and 0 deletions

View file

@ -12,6 +12,20 @@
#include <stdbool.h>
#include <sys/types.h>
/**
* CIE 1931 xy chromaticity coordinates.
*/
struct wlr_color_cie1931_xy {
float x, y;
};
/**
* Color primaries and white point describing a color volume.
*/
struct wlr_color_primaries {
struct wlr_color_cie1931_xy red, green, blue, white;
};
/**
* A color transformation formula, which maps a linear color space with
* sRGB primaries to an output color space.