Skip to main content

farg/chromatic_adaptation_transform/
sharp.rs

1use super::ChromaticAdaptationTransform;
2
3impl ChromaticAdaptationTransform {
4  /// The default CAT when this is the highest-priority enabled transform.
5  #[cfg(all(
6    not(feature = "cat-bradford"),
7    not(feature = "cat-cat16"),
8    not(feature = "cat-cat02"),
9    not(feature = "cat-cmc-cat2000"),
10    not(feature = "cat-von-kries"),
11    not(feature = "cat-hunt-pointer-estevez"),
12  ))]
13  pub const DEFAULT: Self = Self::SHARP;
14  /// The Sharp chromatic adaptation transform (Süsstrunk et al.).
15  pub const SHARP: Self = Self::new(
16    "Sharp",
17    [
18      [1.2694, -0.0988, -0.1706],
19      [-0.8364, 1.8006, 0.0357],
20      [0.0297, -0.0315, 1.0018],
21    ],
22  );
23}