pub struct SyntaxPalette {Show 24 fields
pub comment: Hsla,
pub keyword: Hsla,
pub string: Hsla,
pub string_special: Hsla,
pub escape: Hsla,
pub number: Hsla,
pub boolean: Hsla,
pub type_name: Hsla,
pub type_builtin: Hsla,
pub constructor: Hsla,
pub function: Hsla,
pub function_builtin: Hsla,
pub macro_name: Hsla,
pub property: Hsla,
pub constant: Hsla,
pub variable: Hsla,
pub variable_special: Hsla,
pub parameter: Hsla,
pub operator: Hsla,
pub punctuation: Hsla,
pub tag: Hsla,
pub attribute: Hsla,
pub label: Hsla,
pub invalid: Hsla,
}Expand description
Paint-only syntax colors. The hues follow the Git history graph’s lane palette (indigo, pink, emerald, amber, red, neutral), while light-mode variants are darkened enough to remain readable as text on white.
Fields§
§comment: Hsla§keyword: Hsla§string: Hsla§string_special: Hsla§escape: Hsla§number: Hsla§boolean: Hsla§type_name: Hsla§type_builtin: Hsla§constructor: Hsla§function: Hsla§function_builtin: Hsla§macro_name: Hsla§property: Hsla§constant: Hsla§variable: Hsla§variable_special: Hsla§parameter: Hsla§operator: Hsla§punctuation: Hsla§tag: Hsla§attribute: Hsla§label: Hsla§invalid: HslaImplementations§
Source§impl SyntaxPalette
impl SyntaxPalette
Sourcepub fn color(&self, kind: HighlightKind) -> Hsla
pub fn color(&self, kind: HighlightKind) -> Hsla
The palette color for a token kind.
Trait Implementations§
Source§impl Clone for SyntaxPalette
impl Clone for SyntaxPalette
Source§fn clone(&self) -> SyntaxPalette
fn clone(&self) -> SyntaxPalette
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SyntaxPalette
impl RefUnwindSafe for SyntaxPalette
impl Send for SyntaxPalette
impl Sync for SyntaxPalette
impl Unpin for SyntaxPalette
impl UnsafeUnpin for SyntaxPalette
impl UnwindSafe for SyntaxPalette
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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