pub enum InterpolationSpace {
Show 14 variants
Srgb,
SrgbLinear,
DisplayP3,
A98Rgb,
ProphotoRgb,
Rec2020,
Lab,
Oklab,
XyzD50,
XyzD65,
Hsl(HueInterpolation),
Hwb(HueInterpolation),
Lch(HueInterpolation),
Oklch(HueInterpolation),
}Expand description
A colour space colours can be interpolated in, with the direction hues travel in for polar spaces, as named by CSS
<color-interpolation-method>.
Variants§
Srgb
SrgbLinear
DisplayP3
A98Rgb
ProphotoRgb
Rec2020
Lab
Oklab
XyzD50
XyzD65
Hsl(HueInterpolation)
Hwb(HueInterpolation)
Lch(HueInterpolation)
Oklch(HueInterpolation)
Implementations§
Source§impl InterpolationSpace
impl InterpolationSpace
Sourcepub const fn hue_index(self) -> Option<usize>
pub const fn hue_index(self) -> Option<usize>
The index of the hue among the first three channels, for polar spaces.
Sourcepub const fn hue_interpolation(self) -> Option<HueInterpolation>
pub const fn hue_interpolation(self) -> Option<HueInterpolation>
The direction hues travel in, for polar spaces.
Sourcepub fn channels(self, color: Color) -> [Channel; 4]
pub fn channels(self, color: Color) -> [Channel; 4]
The channels of color in this space, in the units of this space’s colour type, with a powerless hue missing.
Sourcepub fn color(self, channels: [Channel; 4]) -> Color
pub fn color(self, channels: [Channel; 4]) -> Color
The colour with channels in this space, in the units of this space’s colour type. Missing channels are 0.
Sourcepub fn endpoints(
self,
first: [Channel; 4],
second: [Channel; 4],
) -> [[Channel; 4]; 2]
pub fn endpoints( self, first: [Channel; 4], second: [Channel; 4], ) -> [[Channel; 4]; 2]
first and second ready to interpolate straight between, channel by channel: a channel missing from one takes
the other’s value, and stays missing when both miss it. In polar spaces, the first’s hue is put within 0..360
and the second’s turned by whole turns, so that going straight from one to the other travels this space’s
hue_interpolation.
Trait Implementations§
Source§impl Clone for InterpolationSpace
impl Clone for InterpolationSpace
Source§fn clone(&self) -> InterpolationSpace
fn clone(&self) -> InterpolationSpace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InterpolationSpace
Source§impl Debug for InterpolationSpace
impl Debug for InterpolationSpace
impl Eq for InterpolationSpace
Source§impl PartialEq for InterpolationSpace
impl PartialEq for InterpolationSpace
Source§fn eq(&self, other: &InterpolationSpace) -> bool
fn eq(&self, other: &InterpolationSpace) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InterpolationSpace
Auto Trait Implementations§
impl Freeze for InterpolationSpace
impl RefUnwindSafe for InterpolationSpace
impl Send for InterpolationSpace
impl Sync for InterpolationSpace
impl Unpin for InterpolationSpace
impl UnsafeUnpin for InterpolationSpace
impl UnwindSafe for InterpolationSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more