pub trait Color: Clone + PartialEq {
type Tag;
type ChannelsTuple;
// Required methods
fn num_channels() -> u32;
fn to_tuple(self) -> Self::ChannelsTuple;
}Expand description
The base color trait, representing any color
The main use of Color is to manipulate and act on colors in a generic context. It is used
extensively internally.
Required Associated Types§
Sourcetype ChannelsTuple
type ChannelsTuple
A tuple of types for each channel in the color
Required Methods§
Sourcefn num_channels() -> u32
fn num_channels() -> u32
Return how many channels the color has
Sourcefn to_tuple(self) -> Self::ChannelsTuple
fn to_tuple(self) -> Self::ChannelsTuple
Convert a color into a tuple of channels
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.