pub struct ColorTheme {Show 14 fields
pub name: &'static str,
pub dark: bool,
pub bg: &'static str,
pub cursor: &'static str,
pub selection: &'static str,
pub comments: &'static str,
pub functions: &'static str,
pub keywords: &'static str,
pub literals: &'static str,
pub numerics: &'static str,
pub punctuation: &'static str,
pub strs: &'static str,
pub types: &'static str,
pub special: &'static str,
}Expand description
Colors in hexadecimal notation as used in HTML and CSS.
Fields§
§name: &'static str§dark: bool§bg: &'static str§cursor: &'static str§selection: &'static str§comments: &'static str§functions: &'static str§keywords: &'static str§literals: &'static str§numerics: &'static str§punctuation: &'static str§strs: &'static str§types: &'static str§special: &'static strImplementations§
Source§impl ColorTheme
impl ColorTheme
Sourcepub const AYU: ColorTheme
pub const AYU: ColorTheme
Author: André Sá enkodr@outlook.com
Based on the AYU theme colors from https://github.com/dempfi/ayu
pub const AYU_MIRAGE: ColorTheme
pub const AYU_DARK: ColorTheme
Source§impl ColorTheme
impl ColorTheme
Sourcepub const GITHUB_DARK: ColorTheme
pub const GITHUB_DARK: ColorTheme
Author : OwOSwordsman owoswordsman@gmail.com An unofficial GitHub theme, generated using colors from: https://primer.style/primitives/colors
pub const GITHUB_LIGHT: ColorTheme
Source§impl ColorTheme
impl ColorTheme
Sourcepub const GRUVBOX: ColorTheme
pub const GRUVBOX: ColorTheme
Author : Jakub Bartodziej kubabartodziej@gmail.com Theme uses the gruvbox dark palette with standard contrast https://github.com/morhetz/gruvbox
pub const GRUVBOX_DARK: ColorTheme = ColorTheme::GRUVBOX
pub const GRUVBOX_LIGHT: ColorTheme
Source§impl ColorTheme
impl ColorTheme
Sourcepub const SONOKAI: ColorTheme
pub const SONOKAI: ColorTheme
Original Author: sainnhe https://github.com/sainnhe/sonokai Modified by p4ymak https://github.com/p4ymak
Source§impl ColorTheme
impl ColorTheme
pub fn name(&self) -> &str
pub fn is_dark(&self) -> bool
pub fn bg(&self) -> Color32
pub fn cursor(&self) -> Color32
pub fn selection(&self) -> Color32
pub fn modify_style(&self, ui: &mut Ui, fontsize: f32)
pub const fn type_color_str(&self, ty: TokenType) -> &'static str
pub fn type_color(&self, ty: TokenType) -> Color32
pub fn monocolor( dark: bool, bg: &'static str, fg: &'static str, cursor: &'static str, selection: &'static str, ) -> Self
Trait Implementations§
Source§impl Clone for ColorTheme
impl Clone for ColorTheme
Source§fn clone(&self) -> ColorTheme
fn clone(&self) -> ColorTheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorTheme
impl Debug for ColorTheme
Source§impl Default for ColorTheme
impl Default for ColorTheme
Source§impl Hash for ColorTheme
impl Hash for ColorTheme
Source§impl Ord for ColorTheme
impl Ord for ColorTheme
Source§fn cmp(&self, other: &ColorTheme) -> Ordering
fn cmp(&self, other: &ColorTheme) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ColorTheme
impl PartialEq for ColorTheme
Source§impl PartialOrd for ColorTheme
impl PartialOrd for ColorTheme
impl Copy for ColorTheme
impl Eq for ColorTheme
impl StructuralPartialEq for ColorTheme
Auto Trait Implementations§
impl Freeze for ColorTheme
impl RefUnwindSafe for ColorTheme
impl Send for ColorTheme
impl Sync for ColorTheme
impl Unpin for ColorTheme
impl UnwindSafe for ColorTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more