Expand description
§MCU Scheme
Pre-built color scheme variants for Material Design 3.
Each scheme wraps DynamicScheme with a specific Variant:
SchemeMonochrome: Grayscale palette for minimalist designsSchemeNeutral: Low chroma, subtle colors for professional designsSchemeTonalSpot: Balanced, versatile (default for Material Design 3)SchemeVibrant: High chroma, bold colors for energetic designsSchemeExpressive: Playful with hue shifts for artistic designsSchemeFidelity: True to source color for accurate color representationSchemeContent: Content-aware colors for image-derived themesSchemeRainbow: High chroma with tertiary shift for playful designsSchemeFruitSalad: Playful hue variations for fun designs
§Example
use mcu_scheme::SchemeTonalSpot;
use mcu_hct::Hct;
// Create a tonal spot scheme from a blue source color
let source = Hct::from_int(0xFF0000FF);
let scheme = SchemeTonalSpot::new(source, false, 0.0);
// Access underlying DynamicScheme through Deref
assert!(!scheme.is_dark);
let _primary = &scheme.primary_palette;Structs§
- Dynamic
Scheme - A dynamic color scheme generated from a source color.
- Scheme
Content - A content-based color scheme that extracts dominant colors from images.
- Scheme
Expressive - An expressive color scheme with creative color manipulation.
- Scheme
Fidelity - A fidelity color scheme that closely follows the source color’s hue and chroma.
- Scheme
Fruit Salad - A fruit salad color scheme with playful hue variations.
- Scheme
Monochrome - A monochromatic color scheme using only lightness and saturation variations.
- Scheme
Neutral - A neutral color scheme with subtle color shifts.
- Scheme
Rainbow - A rainbow color scheme creating a spectrum-inspired color palette.
- Scheme
Tonal Spot - A tonal spot color scheme emphasizing the source color with tonal adjustments.
- Scheme
Vibrant - A vibrant color scheme with saturated, bold colors.
Enums§
- Platform
- Platform identifier for dynamic scheme. Only used in the 2025 spec.
- Spec
Version - Specification version for dynamic scheme.
- Variant
- Enumeration of dynamic color scheme variants for Material Design 3.