//! Types for luma and luminance (grayscale) values. pub mod channels; #[allow(clippy::module_inception)] mod luma; use crate::encoding::{Gamma, Linear, Srgb}; use crate::white_point::D65; pub use self::luma::{Iter, Luma, Lumaa}; /// sRGB encoded luminance. pub type SrgbLuma = Luma; /// sRGB encoded luminance with an alpha component. pub type SrgbLumaa = Lumaa; /// Linear luminance. #[doc(alias = "linear")] pub type LinLuma = Luma, T>; /// Linear luminance with an alpha component. #[doc(alias = "linear")] pub type LinLumaa = Lumaa, T>; /// Gamma 2.2 encoded luminance. pub type GammaLuma = Luma, T>; /// Gamma 2.2 encoded luminance with an alpha component. pub type GammaLumaa = Lumaa, T>; /// A white point and a transfer function. pub trait LumaStandard { /// The white point of the color space. type WhitePoint; /// The transfer function for the luminance component. type TransferFn; } impl LumaStandard for (Wp, Tf) { type WhitePoint = Wp; type TransferFn = Tf; } /// A packed representation of Luma+Alpha in LA order. pub type PackedLumaa

= crate::cast::Packed; /// A packed representation of Luma+Alpha in AL order. pub type PackedAluma

= crate::cast::Packed;