Struct kas_theme::Colors [−][src]
pub struct Colors<C> {Show 13 fields
pub is_dark: bool,
pub background: C,
pub frame: C,
pub edit_bg: C,
pub edit_bg_disabled: C,
pub edit_bg_error: C,
pub accent: C,
pub accent_soft: C,
pub nav_focus: C,
pub text: C,
pub text_invert: C,
pub text_disabled: C,
pub text_sel_bg: C,
}Expand description
Provides standard theme colours
Fields
is_dark: boolTrue if this is a dark theme
background: CBackground colour
frame: CColour for frames (not always used)
edit_bg: CBackground colour of EditBox
edit_bg_disabled: CBackground colour of EditBox (disabled state)
edit_bg_error: CBackground colour of EditBox (error state)
accent: CTheme accent
This should be a bold colour, used for small details.
accent_soft: CSoft version of accent
A softer version of the accent colour, used for block elements in some themes.
Highlight colour for keyboard navigation
This may be the same as accent. It should contrast well with
accent_soft. Themes should use nav_focus over accent where a
strong contrast is required.
text: CNormal text colour (over background)
text_invert: COpposing text colour (e.g. white if text is black)
text_disabled: CDisabled text colour
text_sel_bg: CSelected text background colour
This may be the same as accent_soft.
Implementations
Adjust a colour depending on state
Get colour of a text area, depending on state
Get colour for navigation highlight region, if any
Get accent colour, adjusted for state
Get soft accent colour, adjusted for state
Get colour for a checkbox mark, depending on state
Get background highlight colour of a menu entry, if any
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<C> RefUnwindSafe for Colors<C> where
C: RefUnwindSafe,
impl<C> UnwindSafe for Colors<C> where
C: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more