Skip to main content

ColorPalette

Struct ColorPalette 

Source
pub struct ColorPalette {
Show 29 fields pub primary: Color, pub secondary: Color, pub text: Color, pub text_dim: Color, pub text_disabled: Color, pub text_placeholder: Color, pub text_muted: Color, pub bg: Color, pub surface: Color, pub surface_raised: Color, pub border_focused: Color, pub border: Color, pub border_disabled: Color, pub border_accent: Color, pub separator: Color, pub highlight_fg: Color, pub highlight_bg: Color, pub menu_highlight_fg: Color, pub menu_highlight_bg: Color, pub pressed_fg: Color, pub pressed_bg: Color, pub success: Color, pub warning: Color, pub error: Color, pub info: Color, pub diff_add_fg: Color, pub diff_add_bg: Color, pub diff_del_fg: Color, pub diff_del_bg: Color,
}
Expand description

A semantic color palette with ~30 color roles.

Each color has a specific semantic purpose (e.g., primary for focus/selection, error for error states) rather than a visual description.

Fields§

§primary: Color

Focus/selection accent color.

§secondary: Color

Secondary accent color.

§text: Color

Main text color.

§text_dim: Color

Secondary text, line numbers.

§text_disabled: Color

Disabled/inactive text.

§text_placeholder: Color

Placeholder text.

§text_muted: Color

Shortcuts/hints.

§bg: Color

Main background.

§surface: Color

Elevated surface - menus/popups.

§surface_raised: Color

Bar/header background.

§border_focused: Color

Focused border.

§border: Color

Default border.

§border_disabled: Color

Disabled border.

§border_accent: Color

Accent border - panels.

§separator: Color

Dividers/separators.

§highlight_fg: Color

Highlighted foreground.

§highlight_bg: Color

Highlighted background.

§menu_highlight_fg: Color

Menu highlight foreground.

§menu_highlight_bg: Color

Menu highlight background.

§pressed_fg: Color

Pressed foreground.

§pressed_bg: Color

Pressed background.

§success: Color

Success color.

§warning: Color

Warning color.

§error: Color

Error: Color,

§info: Color

Info color.

§diff_add_fg: Color

Diff addition foreground.

§diff_add_bg: Color

Diff addition background.

§diff_del_fg: Color

Diff deletion foreground.

§diff_del_bg: Color

Diff deletion background.

Trait Implementations§

Source§

impl Clone for ColorPalette

Source§

fn clone(&self) -> ColorPalette

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColorPalette

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ColorPalette

Source§

fn eq(&self, other: &ColorPalette) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ColorPalette

Source§

impl StructuralPartialEq for ColorPalette

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.