mcu-scheme 0.2.2

Color scheme variants (TonalSpot, Vibrant, Expressive, etc.)
Documentation

MCU Scheme

Pre-built color scheme variants for Material Design 3.

Each scheme wraps DynamicScheme with a specific Variant:

  • [SchemeMonochrome]: Grayscale palette for minimalist designs
  • [SchemeNeutral]: Low chroma, subtle colors for professional designs
  • [SchemeTonalSpot]: Balanced, versatile (default for Material Design 3)
  • [SchemeVibrant]: High chroma, bold colors for energetic designs
  • [SchemeExpressive]: Playful with hue shifts for artistic designs
  • [SchemeFidelity]: True to source color for accurate color representation
  • [SchemeContent]: Content-aware colors for image-derived themes
  • [SchemeRainbow]: High chroma with tertiary shift for playful designs
  • [SchemeFruitSalad]: 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;