#[non_exhaustive]pub enum ColorPrimaries {
Bt709,
AdobeRgb,
DciP3,
Bt2020,
}Expand description
The container colorimetry a producer says its layer is in.
The friendly producer-side description, distinct from
Colorspace, which is what the driver advertises on a connector. The
scene picks the connector enum that best matches the widest-gamut layer at
commit time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bt709
BT.709 / sRGB. The SDR default.
AdobeRgb
Adobe RGB (1998).
DciP3
DCI-P3 D65, display-referred consumer P3.
Bt2020
BT.2020 / Rec.2100. HDR and wide-gamut SDR.
Implementations§
Source§impl ColorPrimaries
impl ColorPrimaries
Sourcepub const fn is_wider_than(self, other: Self) -> bool
pub const fn is_wider_than(self, other: Self) -> bool
Whether self is a wider gamut than other.
Variants are declared widest last, so the derived Ord ranks gamut
directly.
Deliberate: a separate rank function and a variant order that disagreed would be a silent mis-ranking, and there is nothing to notice it. Adding a variant in the wrong place breaks a test here rather than a picture on a display.
Sourcepub const fn colorimetry(self) -> ColorimetryInfo
pub const fn colorimetry(self) -> ColorimetryInfo
Canonical CIE 1931 chromaticities, ready to seed mastering-display primaries.
All four are D65-white.
Sourcepub const fn colorspace(self) -> Colorspace
pub const fn colorspace(self) -> Colorspace
The connector enum that best carries this.