Skip to main content

Crate oxiui_theme

Crate oxiui_theme 

Source
Expand description

COOLJAPAN dark/light themes — Tokyo Night palette.

§Quick start

let theme = oxiui_theme::cooljapan_default();
assert_eq!(theme.palette().background.0, 26); // Tokyo Night dark #1A1B26

Re-exports§

pub use high_contrast::cooljapan_high_contrast;
pub use high_contrast::cooljapan_high_contrast_light;
pub use anim_tokens::fade_in;
pub use anim_tokens::scale_up;
pub use anim_tokens::slide_in;
pub use anim_tokens::AnimationKeyframe;
pub use anim_tokens::AnimationSpec;
pub use anim_tokens::EasingKind;
pub use anim_tokens::FillMode;
pub use anim_tokens::IterationCount;
pub use anim_tokens::TransitionSpec;
pub use breakpoint::Breakpoint;
pub use builder::ContrastWarning;
pub use builder::PaletteBuilder;
pub use builder::ValidationResult;
pub use builder::WcagLevel;
pub use compile::CompiledStyleSheet;
pub use gallery::make_catppuccin_latte;
pub use gallery::make_catppuccin_mocha;
pub use gallery::make_dracula;
pub use gallery::make_material_dark;
pub use gallery::make_material_light;
pub use gallery::make_nord_dark;
pub use gallery::make_nord_light;
pub use gallery::make_solarized_dark;
pub use gallery::make_solarized_light;
pub use icons::BuiltinIcons;
pub use icons::IconName;
pub use icons::IconSet;
pub use icons::IconVariant;
pub use inheritance::resolve as resolve_inheritance;
pub use lazy_palette::LazyPaletteVariants;
pub use manager::ThemeListener;
pub use manager::ThemeManager;
pub use overlay::overlay;
pub use overlay::PartialTheme;
pub use palette_ext::ExtendedPalette;
pub use serial::deserialize_theme;
pub use serial::serialize_theme;
pub use serial::ThemeSnapshot;
pub use spec::elevation_shadow;
pub use spec::elevation_shadows;
pub use spec::elevation_to_shadow;
pub use spec::BorderSpec;
pub use spec::BorderSpecs;
pub use spec::BorderStyle;
pub use spec::ShadowSpec;
pub use style_cache::StyleCache;
pub use stylesheet::ComputedStyle;
pub use stylesheet::CssValue;
pub use stylesheet::ParseDiagnostic;
pub use stylesheet::ParseResult;
pub use stylesheet::Rule;
pub use stylesheet::Selector;
pub use stylesheet::SelectorPart;
pub use stylesheet::Specificity;
pub use stylesheet::StyleSheet;
pub use tokens::DesignTokens;
pub use tokens::RadiusStep;
pub use tokens::SpacingStep;
pub use typography::TextStyleToken;
pub use typography::TypographyScale;

Modules§

anim_tokens
Animation and transition tokens for OxiUI themes.
breakpoint
Responsive breakpoints matching common CSS media-query thresholds.
builder
Fluent PaletteBuilder with WCAG contrast validation.
color
Colour-manipulation utilities operating on oxiui_core::Color.
compile
Compiled stylesheet for ~O(1) widget→style lookup.
gallery
Predefined theme gallery — canonical colour-scheme presets.
high_contrast
COOLJAPAN high-contrast palette — WCAG AAA compliant.
icons
Icon theme trait and built-in icon set with hand-authored SVG path data.
inheritance
CSS-style property inheritance for computed styles.
lazy_palette
Lazy computation of hover / pressed / disabled colour variants.
manager
ThemeManager — runtime theme switching with observer notifications.
overlay
Theme composition via PartialTheme overlays.
palette_ext
Extended semantic palette built on top of the core Palette.
serial
Theme serialization and deserialization via oxicode.
spec
Border and shadow specifications, plus elevation → shadow presets.
style_cache
Memoized style cache for resolved ComputedStyle values.
stylesheet
CSS-subset stylesheet parser with cascading specificity resolution.
tokens
Design tokens: spacing, border-radius, elevation, and opacity scales.
typography
Typographic scale: named text roles with size, line-height, weight, spacing.

Structs§

CooljapanTheme
COOLJAPAN theme implementing Theme: a colour Palette plus a FontSpec.

Traits§

ThemeExt
Extension trait adding design tokens, typography, and the extended palette to any Theme.

Functions§

cooljapan_default
Returns the COOLJAPAN default theme (dark / Tokyo Night).
dark
Returns the COOLJAPAN dark theme (Tokyo Night).
light
Returns the COOLJAPAN light theme.
os_prefers_high_contrast
Returns true if the OS (or user preference env var) requests high-contrast mode.
os_prefers_reduced_motion
Returns true if the OS (or user preference env var) requests reduced motion (fewer animations / transitions).