Skip to main content

colr_types/model/
cmyk.rs

1//! Device-dependent CMYK and RGB color models.
2
3use core::marker::PhantomData;
4
5use crate::BackingStore;
6use crate::layout::Rgba;
7
8/// Device-dependent CMYK. The mapping to XYZ is defined by a runtime ICC
9/// profile. Channels are always `[C, M, Y, K]` in that order.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
11pub struct Cmyk;
12
13impl BackingStore<[f32; 4]> for Cmyk {}
14
15/// Device-dependent RGB. The mapping to XYZ is defined by a runtime ICC
16/// profile. Layout defaults to `Rgba`.
17#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
18pub struct DeviceRgb<L = Rgba>(PhantomData<L>);
19
20impl<L, S> BackingStore<S> for DeviceRgb<L> where L: BackingStore<S> {}