Struct theme2::ThemeColors

source ·
pub struct ThemeColors {
Show 65 fields pub border: Hsla, pub border_variant: Hsla, pub border_focused: Hsla, pub border_selected: Hsla, pub border_transparent: Hsla, pub border_disabled: Hsla, pub elevated_surface_background: Hsla, pub surface_background: Hsla, pub background: Hsla, pub element_background: Hsla, pub element_hover: Hsla, pub element_active: Hsla, pub element_selected: Hsla, pub element_disabled: Hsla, pub drop_target_background: Hsla, pub ghost_element_background: Hsla, pub ghost_element_hover: Hsla, pub ghost_element_active: Hsla, pub ghost_element_selected: Hsla, pub ghost_element_disabled: Hsla, pub text: Hsla, pub text_muted: Hsla, pub text_placeholder: Hsla, pub text_disabled: Hsla, pub text_accent: Hsla, pub icon: Hsla, pub icon_muted: Hsla, pub icon_disabled: Hsla, pub icon_placeholder: Hsla, pub icon_accent: Hsla, pub status_bar_background: Hsla, pub title_bar_background: Hsla, pub toolbar_background: Hsla, pub tab_bar_background: Hsla, pub tab_inactive_background: Hsla, pub tab_active_background: Hsla, pub editor_background: Hsla, pub editor_gutter_background: Hsla, pub editor_subheader_background: Hsla, pub editor_active_line_background: Hsla, pub editor_highlighted_line_background: Hsla, pub editor_line_number: Hsla, pub editor_active_line_number: Hsla, pub editor_invisible: Hsla, pub editor_wrap_guide: Hsla, pub editor_active_wrap_guide: Hsla, pub editor_document_highlight_read_background: Hsla, pub editor_document_highlight_write_background: Hsla, pub terminal_background: Hsla, pub terminal_ansi_bright_black: Hsla, pub terminal_ansi_bright_red: Hsla, pub terminal_ansi_bright_green: Hsla, pub terminal_ansi_bright_yellow: Hsla, pub terminal_ansi_bright_blue: Hsla, pub terminal_ansi_bright_magenta: Hsla, pub terminal_ansi_bright_cyan: Hsla, pub terminal_ansi_bright_white: Hsla, pub terminal_ansi_black: Hsla, pub terminal_ansi_red: Hsla, pub terminal_ansi_green: Hsla, pub terminal_ansi_yellow: Hsla, pub terminal_ansi_blue: Hsla, pub terminal_ansi_magenta: Hsla, pub terminal_ansi_cyan: Hsla, pub terminal_ansi_white: Hsla,
}

Fields§

§border: Hsla§border_variant: Hsla

Border color. Used for deemphasized borders, like a visual divider between two sections

§border_focused: Hsla

Border color. Used for focused elements, like keyboard focused list item.

§border_selected: Hsla

Border color. Used for selected elements, like an active search filter or selected checkbox.

§border_transparent: Hsla

Border color. Used for transparent borders. Used for placeholder borders when an element gains a border on state change.

§border_disabled: Hsla

Border color. Used for disabled elements, like a disabled input or button.

§elevated_surface_background: Hsla

Border color. Used for elevated surfaces, like a context menu, popup, or dialog.

§surface_background: Hsla

Background Color. Used for grounded surfaces like a panel or tab.

§background: Hsla

Background Color. Used for the app background and blank panels or windows.

§element_background: Hsla

Background Color. Used for the background of an element that should have a different background than the surface it’s on.

Elements might include: Buttons, Inputs, Checkboxes, Radio Buttons…

For an element that should have the same background as the surface it’s on, use ghost_element_background.

§element_hover: Hsla

Background Color. Used for the hover state of an element that should have a different background than the surface it’s on.

Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen.

§element_active: Hsla

Background Color. Used for the active state of an element that should have a different background than the surface it’s on.

Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd.

§element_selected: Hsla

Background Color. Used for the selected state of an element that should have a different background than the surface it’s on.

Selected states are triggered by the element being selected (or “activated”) by the user.

This could include a selected checkbox, a toggleable button that is toggled on, etc.

§element_disabled: Hsla

Background Color. Used for the disabled state of an element that should have a different background than the surface it’s on.

Disabled states are shown when a user cannot interact with an element, like a disabled button or input.

§drop_target_background: Hsla

Background Color. Used for the area that shows where a dragged element will be dropped.

§ghost_element_background: Hsla

Border Color. Used to show the area that shows where a dragged element will be dropped. Used for the background of a ghost element that should have the same background as the surface it’s on.

Elements might include: Buttons, Inputs, Checkboxes, Radio Buttons…

For an element that should have a different background than the surface it’s on, use element_background.

§ghost_element_hover: Hsla

Background Color. Used for the hover state of a ghost element that should have the same background as the surface it’s on.

Hover states are triggered by the mouse entering an element, or a finger touching an element on a touch screen.

§ghost_element_active: Hsla

Background Color. Used for the active state of a ghost element that should have the same background as the surface it’s on.

Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressd.

§ghost_element_selected: Hsla

Background Color. Used for the selected state of a ghost element that should have the same background as the surface it’s on.

Selected states are triggered by the element being selected (or “activated”) by the user.

This could include a selected checkbox, a toggleable button that is toggled on, etc.

§ghost_element_disabled: Hsla

Background Color. Used for the disabled state of a ghost element that should have the same background as the surface it’s on.

Disabled states are shown when a user cannot interact with an element, like a disabled button or input.

§text: Hsla

Text Color. Default text color used for most text.

§text_muted: Hsla

Text Color. Color of muted or deemphasized text. It is a subdued version of the standard text color.

§text_placeholder: Hsla

Text Color. Color of the placeholder text typically shown in input fields to guide the user to enter valid data.

§text_disabled: Hsla

Text Color. Color used for text denoting disabled elements. Typically, the color is faded or grayed out to emphasize the disabled state.

§text_accent: Hsla

Text Color. Color used for emphasis or highlighting certain text, like an active filter or a matched character in a search.

§icon: Hsla

Fill Color. Used for the default fill color of an icon.

§icon_muted: Hsla

Fill Color. Used for the muted or deemphasized fill color of an icon.

This might be used to show an icon in an inactive pane, or to demphasize a series of icons to give them less visual weight.

§icon_disabled: Hsla

Fill Color. Used for the disabled fill color of an icon.

Disabled states are shown when a user cannot interact with an element, like a icon button.

§icon_placeholder: Hsla

Fill Color. Used for the placeholder fill color of an icon.

This might be used to show an icon in an input that disappears when the user enters text.

§icon_accent: Hsla

Fill Color. Used for the accent fill color of an icon.

This might be used to show when a toggleable icon button is selected.

§status_bar_background: Hsla§title_bar_background: Hsla§toolbar_background: Hsla§tab_bar_background: Hsla§tab_inactive_background: Hsla§tab_active_background: Hsla§editor_background: Hsla§editor_gutter_background: Hsla§editor_subheader_background: Hsla§editor_active_line_background: Hsla§editor_highlighted_line_background: Hsla§editor_line_number: Hsla

Text Color. Used for the text of the line number in the editor gutter.

§editor_active_line_number: Hsla

Text Color. Used for the text of the line number in the editor gutter when the line is highlighted.

§editor_invisible: Hsla

Text Color. Used to mark invisible characters in the editor.

Example: spaces, tabs, carriage returns, etc.

§editor_wrap_guide: Hsla§editor_active_wrap_guide: Hsla§editor_document_highlight_read_background: Hsla§editor_document_highlight_write_background: Hsla§terminal_background: Hsla

Terminal Background Color

§terminal_ansi_bright_black: Hsla

Bright Black Color for ANSI Terminal

§terminal_ansi_bright_red: Hsla

Bright Red Color for ANSI Terminal

§terminal_ansi_bright_green: Hsla

Bright Green Color for ANSI Terminal

§terminal_ansi_bright_yellow: Hsla

Bright Yellow Color for ANSI Terminal

§terminal_ansi_bright_blue: Hsla

Bright Blue Color for ANSI Terminal

§terminal_ansi_bright_magenta: Hsla

Bright Magenta Color for ANSI Terminal

§terminal_ansi_bright_cyan: Hsla

Bright Cyan Color for ANSI Terminal

§terminal_ansi_bright_white: Hsla

Bright White Color for ANSI Terminal

§terminal_ansi_black: Hsla

Black Color for ANSI Terminal

§terminal_ansi_red: Hsla

Red Color for ANSI Terminal

§terminal_ansi_green: Hsla

Green Color for ANSI Terminal

§terminal_ansi_yellow: Hsla

Yellow Color for ANSI Terminal

§terminal_ansi_blue: Hsla

Blue Color for ANSI Terminal

§terminal_ansi_magenta: Hsla

Magenta Color for ANSI Terminal

§terminal_ansi_cyan: Hsla

Cyan Color for ANSI Terminal

§terminal_ansi_white: Hsla

White Color for ANSI Terminal

Implementations§

source§

impl ThemeColors

source

pub fn light() -> Self

source

pub fn dark() -> Self

Trait Implementations§

source§

impl Clone for ThemeColors

source§

fn clone(&self) -> ThemeColors

Returns a copy 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 ThemeColors

source§

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

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

impl From<ThemeColorsRefinement> for ThemeColorswhere Option<Hsla>: Clone,

source§

fn from(value: ThemeColorsRefinement) -> Self

Converts to this type from the input type.
source§

impl Refineable for ThemeColorswhere Option<Hsla>: Clone,

§

type Refinement = ThemeColorsRefinement

source§

fn refine(&mut self, refinement: &Self::Refinement)

source§

fn refined(self, refinement: Self::Refinement) -> Self

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more