Skip to main content

ColorRole

Enum ColorRole 

Source
#[repr(usize)]
pub enum ColorRole {
Show 62 variants ERROR = 0, ERROR_CONTAINER = 1, INFO = 2, INVERSE_ON_SURFACE = 3, INVERSE_PRIMARY = 4, INVERSE_SURFACE = 5, ON_ERROR = 6, ON_ERROR_CONTAINER = 7, ON_INFO = 8, ON_PRIMARY = 9, ON_PRIMARY_CONTAINER = 10, ON_PRIMARY_FIXED = 11, ON_PRIMARY_FIXED_VARIANT = 12, ON_SECONDARY = 13, ON_SECONDARY_CONTAINER = 14, ON_SECONDARY_FIXED = 15, ON_SECONDARY_FIXED_VARIANT = 16, ON_SUCCESS = 17, ON_SURFACE = 18, ON_SURFACE_VARIANT = 19, ON_TERTIARY = 20, ON_TERTIARY_CONTAINER = 21, ON_TERTIARY_FIXED = 22, ON_TERTIARY_FIXED_VARIANT = 23, ON_WARNING = 24, OUTLINE = 25, OUTLINE_VARIANT = 26, PRIMARY = 27, PRIMARY_CONTAINER = 28, PRIMARY_FIXED = 29, PRIMARY_FIXED_DIM = 30, SCRIM = 31, SECONDARY = 32, SECONDARY_CONTAINER = 33, SECONDARY_FIXED = 34, SECONDARY_FIXED_DIM = 35, SHADOW = 36, SUCCESS = 37, SURFACE = 38, SURFACE_BRIGHT = 39, SURFACE_CONTAINER = 40, SURFACE_CONTAINER_HIGH = 41, SURFACE_CONTAINER_HIGHEST = 42, SURFACE_CONTAINER_LOW = 43, SURFACE_CONTAINER_LOWEST = 44, SURFACE_DIM = 45, SURFACE_VARIANT = 46, TERTIARY = 47, TERTIARY_CONTAINER = 48, TERTIARY_FIXED = 49, TERTIARY_FIXED_DIM = 50, WARNING = 51, INSET = 52, FAINT = 53, CARD_LINE = 54, SUCCESS_BG = 55, WARNING_BG = 56, FIND_HIGHLIGHT = 57, FIND_CURRENT = 58, FIND_CURRENT_LINE = 59, SELECTION = 60, READING_SELECTION = 61,
}
Expand description

A semantic color role. Components paint with roles, never with a palette’s stored colors.

Variants§

§

ERROR = 0

§

ERROR_CONTAINER = 1

§

INFO = 2

§

INVERSE_ON_SURFACE = 3

§

INVERSE_PRIMARY = 4

§

INVERSE_SURFACE = 5

§

ON_ERROR = 6

§

ON_ERROR_CONTAINER = 7

§

ON_INFO = 8

§

ON_PRIMARY = 9

§

ON_PRIMARY_CONTAINER = 10

§

ON_PRIMARY_FIXED = 11

§

ON_PRIMARY_FIXED_VARIANT = 12

§

ON_SECONDARY = 13

§

ON_SECONDARY_CONTAINER = 14

§

ON_SECONDARY_FIXED = 15

§

ON_SECONDARY_FIXED_VARIANT = 16

§

ON_SUCCESS = 17

§

ON_SURFACE = 18

§

ON_SURFACE_VARIANT = 19

§

ON_TERTIARY = 20

§

ON_TERTIARY_CONTAINER = 21

§

ON_TERTIARY_FIXED = 22

§

ON_TERTIARY_FIXED_VARIANT = 23

§

ON_WARNING = 24

§

OUTLINE = 25

§

OUTLINE_VARIANT = 26

§

PRIMARY = 27

§

PRIMARY_CONTAINER = 28

§

PRIMARY_FIXED = 29

§

PRIMARY_FIXED_DIM = 30

§

SCRIM = 31

§

SECONDARY = 32

§

SECONDARY_CONTAINER = 33

§

SECONDARY_FIXED = 34

§

SECONDARY_FIXED_DIM = 35

§

SHADOW = 36

§

SUCCESS = 37

§

SURFACE = 38

§

SURFACE_BRIGHT = 39

§

SURFACE_CONTAINER = 40

§

SURFACE_CONTAINER_HIGH = 41

§

SURFACE_CONTAINER_HIGHEST = 42

§

SURFACE_CONTAINER_LOW = 43

§

SURFACE_CONTAINER_LOWEST = 44

§

SURFACE_DIM = 45

§

SURFACE_VARIANT = 46

§

TERTIARY = 47

§

TERTIARY_CONTAINER = 48

§

TERTIARY_FIXED = 49

§

TERTIARY_FIXED_DIM = 50

§

WARNING = 51

§

INSET = 52

§

FAINT = 53

§

CARD_LINE = 54

§

SUCCESS_BG = 55

§

WARNING_BG = 56

§

FIND_HIGHLIGHT = 57

§

FIND_CURRENT = 58

§

FIND_CURRENT_LINE = 59

§

SELECTION = 60

§

READING_SELECTION = 61

Implementations§

Source§

impl ColorRole

Source

pub const ALL: &'static [ColorRole]

Every role, in declaration order.

Source§

impl ColorRole

Source

pub const CANVAS: ColorRole = Self::SURFACE_CONTAINER

👎Deprecated:

use ColorRole::SURFACE_CONTAINER

Legacy name for ColorRole::SURFACE_CONTAINER, the window ground.

Source

pub const SURFACE_HIGH: ColorRole = Self::SURFACE_CONTAINER_HIGHEST

👎Deprecated:

use ColorRole::SURFACE_CONTAINER_HIGHEST

Legacy name for ColorRole::SURFACE_CONTAINER_HIGHEST. Despite the name, this is the highest container, not ColorRole::SURFACE_CONTAINER_HIGH.

Source

pub const INK: ColorRole = Self::ON_SURFACE

👎Deprecated:

use ColorRole::ON_SURFACE

Legacy name for ColorRole::ON_SURFACE, primary text and icons.

Source

pub const GRAY: ColorRole = Self::ON_SURFACE_VARIANT

👎Deprecated:

use ColorRole::ON_SURFACE_VARIANT

Legacy name for ColorRole::ON_SURFACE_VARIANT, secondary text and icons.

Source

pub const HAIRLINE: ColorRole = Self::OUTLINE_VARIANT

👎Deprecated:

use ColorRole::OUTLINE_VARIANT

Legacy name for ColorRole::OUTLINE_VARIANT, decorative dividers.

Source

pub const CONTROL: ColorRole = Self::OUTLINE

👎Deprecated:

use ColorRole::OUTLINE

Legacy name for ColorRole::OUTLINE, control boundaries such as outlined fields and unselected checkboxes.

Source

pub const ACCENT: ColorRole = Self::PRIMARY

👎Deprecated:

use ColorRole::PRIMARY

Legacy name for ColorRole::PRIMARY.

Source

pub const DANGER: ColorRole = Self::ERROR

👎Deprecated:

use ColorRole::ERROR

Legacy name for ColorRole::ERROR.

Source

pub const DANGER_BG: ColorRole = Self::ERROR_CONTAINER

👎Deprecated:

use ColorRole::ERROR_CONTAINER

Legacy name for ColorRole::ERROR_CONTAINER.

Trait Implementations§

Source§

impl Clone for ColorRole

Source§

fn clone(&self) -> ColorRole

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ColorRole

Source§

impl Debug for ColorRole

Source§

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

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

impl Eq for ColorRole

Source§

impl Hash for ColorRole

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ColorRole

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ColorRole

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> AutoreleaseSafe for T
where T: ?Sized,

Source§

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

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<T> DynClone for T
where T: Clone,

Source§

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

§

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

§

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

Checks if this value is equivalent to the given key. Read more
§

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

§

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

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

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

§

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

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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

impl<T> Pointable for T

§

const ALIGN: usize

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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