pub trait ColorSpace {
    fn components(&self) -> (f32, f32, f32, f32);
    fn channels(&self) -> (&'static str, &'static str, &'static str);
    fn types(&self) -> (ChannelType, ChannelType, ChannelType);
    fn resolve_missing(&self) -> Self;
    fn resolve(&self) -> Self;
}
Expand description

A trait for color spaces.

Required Methods§

Returns the raw color component values.

Returns the channel names for this color space.

Returns the channel types for this color space.

Resolves missing color components (e.g. none keywords) in the color.

Returns a resolved color by replacing missing (i.e. none) components with zero, and performing gamut mapping to ensure the color can be represented within the color space.

Implementors§