pub struct DiffTheme {Show 17 fields
pub deleted: Rgb,
pub inserted: Rgb,
pub moved: Rgb,
pub unchanged: Rgb,
pub key: Rgb,
pub structure: Rgb,
pub comment: Rgb,
pub string: Rgb,
pub number: Rgb,
pub boolean: Rgb,
pub null: Rgb,
pub deleted_line_bg: Option<Rgb>,
pub deleted_highlight_bg: Option<Rgb>,
pub inserted_line_bg: Option<Rgb>,
pub inserted_highlight_bg: Option<Rgb>,
pub moved_line_bg: Option<Rgb>,
pub moved_highlight_bg: Option<Rgb>,
}Expand description
Color theme for diff rendering.
Defines colors for different kinds of changes. The default uses colorblind-friendly yellow/blue with type-specific value colors.
Fields§
§deleted: RgbForeground color for deleted content (accent color)
inserted: RgbForeground color for inserted content (accent color)
moved: RgbForeground color for moved content (accent color)
unchanged: RgbForeground color for unchanged content
key: RgbForeground color for keys/field names
structure: RgbForeground color for structural elements like braces, brackets
comment: RgbForeground color for comments and type hints
string: RgbBase color for string values
number: RgbBase color for numeric values (integers, floats)
boolean: RgbBase color for boolean values
null: RgbBase color for null/None values
deleted_line_bg: Option<Rgb>Subtle background for deleted lines (None = no background)
deleted_highlight_bg: Option<Rgb>Stronger background highlight for changed values on deleted lines
inserted_line_bg: Option<Rgb>Subtle background for inserted lines (None = no background)
inserted_highlight_bg: Option<Rgb>Stronger background highlight for changed values on inserted lines
moved_line_bg: Option<Rgb>Subtle background for moved lines (None = no background)
moved_highlight_bg: Option<Rgb>Stronger background highlight for changed values on moved lines
Implementations§
Source§impl DiffTheme
impl DiffTheme
Sourcepub const COLORBLIND_ORANGE_BLUE: Self
pub const COLORBLIND_ORANGE_BLUE: Self
Colorblind-friendly theme - orange vs blue. No backgrounds.
Sourcepub const COLORBLIND_WITH_BG: Self
pub const COLORBLIND_WITH_BG: Self
Colorblind-friendly with line + highlight backgrounds (yellow/blue).
Sourcepub const PASTEL: Self
pub const PASTEL: Self
Pastel color theme - soft but distinguishable (not colorblind-friendly).
Sourcepub const ONE_DARK_PRO: Self
pub const ONE_DARK_PRO: Self
One Dark Pro color theme.
Sourcepub const TOKYO_NIGHT: Self
pub const TOKYO_NIGHT: Self
Tokyo Night color theme.
Sourcepub fn color_for(&self, kind: ChangeKind) -> Rgb
pub fn color_for(&self, kind: ChangeKind) -> Rgb
Get the color for a change kind.
Sourcepub fn blend(a: Rgb, b: Rgb, t: f32) -> Rgb
pub fn blend(a: Rgb, b: Rgb, t: f32) -> Rgb
Blend two colors in linear sRGB space.
t ranges from 0.0 (all a) to 1.0 (all b).
Sourcepub fn brighten_saturate(
rgb: Rgb,
lightness_boost: f32,
chroma_boost: f32,
) -> Rgb
pub fn brighten_saturate( rgb: Rgb, lightness_boost: f32, chroma_boost: f32, ) -> Rgb
Brighten and saturate a color for use in highlights. Increases both lightness and saturation in LCH space.
Sourcepub fn desaturate(rgb: Rgb, amount: f32) -> Rgb
pub fn desaturate(rgb: Rgb, amount: f32) -> Rgb
Desaturate a color for use in backgrounds. Reduces saturation (chroma) in LCH space.
Sourcepub fn deleted_key(&self) -> Rgb
pub fn deleted_key(&self) -> Rgb
Get the key color blended for a deleted context.
Sourcepub fn inserted_key(&self) -> Rgb
pub fn inserted_key(&self) -> Rgb
Get the key color blended for an inserted context.
Sourcepub fn deleted_structure(&self) -> Rgb
pub fn deleted_structure(&self) -> Rgb
Get the structure color blended for a deleted context.
Sourcepub fn inserted_structure(&self) -> Rgb
pub fn inserted_structure(&self) -> Rgb
Get the structure color blended for an inserted context.
Sourcepub fn deleted_comment(&self) -> Rgb
pub fn deleted_comment(&self) -> Rgb
Get the comment color blended for a deleted context.
Sourcepub fn inserted_comment(&self) -> Rgb
pub fn inserted_comment(&self) -> Rgb
Get the comment color blended for an inserted context.
Sourcepub fn deleted_string(&self) -> Rgb
pub fn deleted_string(&self) -> Rgb
Get the string color blended for a deleted context.
Sourcepub fn inserted_string(&self) -> Rgb
pub fn inserted_string(&self) -> Rgb
Get the string color blended for an inserted context.
Sourcepub fn deleted_number(&self) -> Rgb
pub fn deleted_number(&self) -> Rgb
Get the number color blended for a deleted context.
Sourcepub fn inserted_number(&self) -> Rgb
pub fn inserted_number(&self) -> Rgb
Get the number color blended for an inserted context.
Sourcepub fn deleted_boolean(&self) -> Rgb
pub fn deleted_boolean(&self) -> Rgb
Get the boolean color blended for a deleted context.
Sourcepub fn inserted_boolean(&self) -> Rgb
pub fn inserted_boolean(&self) -> Rgb
Get the boolean color blended for an inserted context.
Sourcepub fn deleted_null(&self) -> Rgb
pub fn deleted_null(&self) -> Rgb
Get the null color blended for a deleted context.
Sourcepub fn inserted_null(&self) -> Rgb
pub fn inserted_null(&self) -> Rgb
Get the null color blended for an inserted context.
Sourcepub fn deleted_highlight_string(&self) -> Rgb
pub fn deleted_highlight_string(&self) -> Rgb
Get the string color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_string(&self) -> Rgb
pub fn inserted_highlight_string(&self) -> Rgb
Get the string color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_number(&self) -> Rgb
pub fn deleted_highlight_number(&self) -> Rgb
Get the number color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_number(&self) -> Rgb
pub fn inserted_highlight_number(&self) -> Rgb
Get the number color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_boolean(&self) -> Rgb
pub fn deleted_highlight_boolean(&self) -> Rgb
Get the boolean color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_boolean(&self) -> Rgb
pub fn inserted_highlight_boolean(&self) -> Rgb
Get the boolean color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_null(&self) -> Rgb
pub fn deleted_highlight_null(&self) -> Rgb
Get the null color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_null(&self) -> Rgb
pub fn inserted_highlight_null(&self) -> Rgb
Get the null color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_key(&self) -> Rgb
pub fn deleted_highlight_key(&self) -> Rgb
Get the key color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_key(&self) -> Rgb
pub fn inserted_highlight_key(&self) -> Rgb
Get the key color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_structure(&self) -> Rgb
pub fn deleted_highlight_structure(&self) -> Rgb
Get the structure color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_structure(&self) -> Rgb
pub fn inserted_highlight_structure(&self) -> Rgb
Get the structure color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn deleted_highlight_comment(&self) -> Rgb
pub fn deleted_highlight_comment(&self) -> Rgb
Get the comment color for a deleted highlight (brightened and saturated accent color).
Sourcepub fn inserted_highlight_comment(&self) -> Rgb
pub fn inserted_highlight_comment(&self) -> Rgb
Get the comment color for an inserted highlight (brightened and saturated accent color).
Sourcepub fn desaturated_deleted_line_bg(&self) -> Option<Rgb>
pub fn desaturated_deleted_line_bg(&self) -> Option<Rgb>
Get desaturated deleted line background (more saturated ambient, darker context).
Sourcepub fn desaturated_inserted_line_bg(&self) -> Option<Rgb>
pub fn desaturated_inserted_line_bg(&self) -> Option<Rgb>
Get desaturated inserted line background (more saturated ambient, darker context).
Sourcepub fn desaturated_moved_line_bg(&self) -> Option<Rgb>
pub fn desaturated_moved_line_bg(&self) -> Option<Rgb>
Get desaturated moved line background (more saturated ambient, darker context).
Sourcepub fn desaturated_deleted_highlight_bg(&self) -> Option<Rgb>
pub fn desaturated_deleted_highlight_bg(&self) -> Option<Rgb>
Get desaturated deleted highlight background (very desaturated, minimal brightness boost).
Sourcepub fn desaturated_inserted_highlight_bg(&self) -> Option<Rgb>
pub fn desaturated_inserted_highlight_bg(&self) -> Option<Rgb>
Get desaturated inserted highlight background (very desaturated, minimal brightness boost).
Sourcepub fn desaturated_moved_highlight_bg(&self) -> Option<Rgb>
pub fn desaturated_moved_highlight_bg(&self) -> Option<Rgb>
Get desaturated moved highlight background (very desaturated, minimal brightness boost).
Trait Implementations§
impl Eq for DiffTheme
impl StructuralPartialEq for DiffTheme
Auto Trait Implementations§
impl Freeze for DiffTheme
impl RefUnwindSafe for DiffTheme
impl Send for DiffTheme
impl Sync for DiffTheme
impl Unpin for DiffTheme
impl UnwindSafe for DiffTheme
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§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 moreSource§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 moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more