Trait lightningcss::values::color::ColorSpace
source · 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§
sourcefn channels(&self) -> (&'static str, &'static str, &'static str)
fn channels(&self) -> (&'static str, &'static str, &'static str)
Returns the channel names for this color space.
sourcefn types(&self) -> (ChannelType, ChannelType, ChannelType)
fn types(&self) -> (ChannelType, ChannelType, ChannelType)
Returns the channel types for this color space.
sourcefn resolve_missing(&self) -> Self
fn resolve_missing(&self) -> Self
Resolves missing color components (e.g. none
keywords) in the color.