pub struct ColorPalette {
pub bg: Option<String>,
pub text: Option<String>,
pub text_muted: Option<String>,
pub accent: Option<String>,
pub accent_hover: Option<String>,
pub border: Option<String>,
pub code_bg: Option<String>,
pub surface_bg: Option<String>,
pub surface_border: Option<String>,
pub surface_shadow: Option<String>,
pub divider_color: Option<String>,
}Expand description
Color palette for a single mode (light or dark).
Maps the app’s 26-color OKLch theme palette to the 11 CSS variables used by the publish stylesheet. Values are CSS color strings (OKLch, hex, etc.).
Fields§
§bg: Option<String>Page background (--bg)
text: Option<String>Primary text color (--text)
text_muted: Option<String>Secondary/muted text (--text-muted)
accent: Option<String>Accent/link color (--accent)
accent_hover: Option<String>Accent hover state (--accent-hover)
border: Option<String>Border color (--border)
code_bg: Option<String>Code/pre background (--code-bg)
surface_bg: Option<String>Surface background for floating elements (--surface-bg)
surface_border: Option<String>Surface border (--surface-border)
surface_shadow: Option<String>Surface shadow (--surface-shadow)
divider_color: Option<String>Divider color (--divider-color)
Implementations§
Source§impl ColorPalette
impl ColorPalette
Sourcepub fn to_css_vars(&self) -> String
pub fn to_css_vars(&self) -> String
Generate CSS variable declarations for all set colors.
Trait Implementations§
Source§impl Clone for ColorPalette
impl Clone for ColorPalette
Source§fn clone(&self) -> ColorPalette
fn clone(&self) -> ColorPalette
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 moreSource§impl Debug for ColorPalette
impl Debug for ColorPalette
Source§impl Default for ColorPalette
impl Default for ColorPalette
Source§fn default() -> ColorPalette
fn default() -> ColorPalette
Returns the “default value” for a type. Read more
Source§impl FromValue for ColorPalette
impl FromValue for ColorPalette
Auto Trait Implementations§
impl Freeze for ColorPalette
impl RefUnwindSafe for ColorPalette
impl Send for ColorPalette
impl Sync for ColorPalette
impl Unpin for ColorPalette
impl UnsafeUnpin for ColorPalette
impl UnwindSafe for ColorPalette
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