colr-types 0.3.1

Color model ZSTs and marker traits for colr.
Documentation
//! Device-dependent CMYK and RGB color models.

use core::marker::PhantomData;

use crate::BackingStore;
use crate::layout::Rgba;

/// Device-dependent CMYK. The mapping to XYZ is defined by a runtime ICC
/// profile. Channels are always `[C, M, Y, K]` in that order.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct Cmyk;

impl BackingStore<[f32; 4]> for Cmyk {}

/// Device-dependent RGB. The mapping to XYZ is defined by a runtime ICC
/// profile. Layout defaults to `Rgba`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct DeviceRgb<L = Rgba>(PhantomData<L>);

impl<L, S> BackingStore<S> for DeviceRgb<L> where L: BackingStore<S> {}