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 #1A1B26Re-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 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
PaletteBuilderwith 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
PartialThemeoverlays. - palette_
ext - Extended semantic palette built on top of the core
Palette. - spec
- Border and shadow specifications, plus elevation → shadow presets.
- style_
cache - Memoized style cache for resolved
ComputedStylevalues. - 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§
- Cooljapan
Theme - COOLJAPAN theme implementing
Theme: a colourPaletteplus aFontSpec.
Traits§
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
trueif the OS (or user preference env var) requests high-contrast mode. - os_
prefers_ reduced_ motion - Returns
trueif the OS (or user preference env var) requests reduced motion (fewer animations / transitions).