#[non_exhaustive]pub enum NamedProfile {
Srgb,
DisplayP3,
Bt2020,
Bt2020Pq,
Bt2020Hlg,
AdobeRgb,
LinearSrgb,
}Expand description
Well-known color profiles that any CMS should recognize.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Srgb
sRGB (IEC 61966-2-1). The web and desktop default.
DisplayP3
Display P3 with sRGB transfer curve.
Bt2020
BT.2020 with BT.709 transfer (SDR wide gamut).
Bt2020Pq
BT.2020 with PQ transfer (HDR10, SMPTE ST 2084).
Bt2020Hlg
BT.2020 with HLG transfer (BT.2100 HLG).
AdobeRgb
Adobe RGB (1998). Used in print workflows.
LinearSrgb
Linear sRGB (sRGB primaries, gamma 1.0).
Implementations§
Source§impl NamedProfile
impl NamedProfile
Sourcepub const fn from_cicp(cicp: Cicp) -> Option<NamedProfile>
pub const fn from_cicp(cicp: Cicp) -> Option<NamedProfile>
Map CICP parameters to a well-known named profile.
Recognizes sRGB, Display P3, BT.2020 (SDR), BT.2100 PQ,
and Linear sRGB. Returns None for unrecognized combinations.
Sourcepub const fn to_cicp(self) -> Option<Cicp>
pub const fn to_cicp(self) -> Option<Cicp>
Convert to CICP parameters, if a standard mapping exists.
Sourcepub const fn to_primaries_transfer(self) -> (ColorPrimaries, TransferFunction)
pub const fn to_primaries_transfer(self) -> (ColorPrimaries, TransferFunction)
Decompose into primaries + transfer function.
Sourcepub const fn from_primaries_transfer(
primaries: ColorPrimaries,
transfer: TransferFunction,
) -> Option<NamedProfile>
pub const fn from_primaries_transfer( primaries: ColorPrimaries, transfer: TransferFunction, ) -> Option<NamedProfile>
Try to construct from a primaries + transfer pair.
Returns None for combinations that don’t have a named profile
(e.g., Display P3 + PQ, or Adobe RGB + Linear).
Trait Implementations§
Source§impl Clone for NamedProfile
impl Clone for NamedProfile
Source§fn clone(&self) -> NamedProfile
fn clone(&self) -> NamedProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more