
When creating a new color state from the primitives Colorimetry, EOTF and Luminance; it is needed to previously check their tags to properly get their values and avoid UB. This check is duplicated and is a bit unreadable. Using this new function helps keeping readability. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4144>