pub trait ProtoColor: Sized {
// Required methods
fn hue(&self) -> OklabHue;
fn saturation(&self) -> Option<ZeroToOne>;
// Provided method
fn into_source(
self,
saturation_if_not_provided: impl Into<ZeroToOne>,
) -> ColorSource { ... }
}
Expand description
A type that can be interpretted as a hue or hue and saturation.
Required Methods§
sourcefn saturation(&self) -> Option<ZeroToOne>
fn saturation(&self) -> Option<ZeroToOne>
Returns the saturation of this prototype color, if available.
Provided Methods§
sourcefn into_source(
self,
saturation_if_not_provided: impl Into<ZeroToOne>,
) -> ColorSource
fn into_source( self, saturation_if_not_provided: impl Into<ZeroToOne>, ) -> ColorSource
Returns a color source built from this prototype color
Object Safety§
This trait is not object safe.