Skip to main content

Crate mcu_scheme

Crate mcu_scheme 

Source
Expand description

§MCU Scheme

Pre-built color scheme variants for Material Design 3.

Each scheme wraps DynamicScheme with a specific Variant:

§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§

DynamicScheme
A dynamic color scheme generated from a source color.
SchemeContent
A content-based color scheme that extracts dominant colors from images.
SchemeExpressive
An expressive color scheme with creative color manipulation.
SchemeFidelity
A fidelity color scheme that closely follows the source color’s hue and chroma.
SchemeFruitSalad
A fruit salad color scheme with playful hue variations.
SchemeMonochrome
A monochromatic color scheme using only lightness and saturation variations.
SchemeNeutral
A neutral color scheme with subtle color shifts.
SchemeRainbow
A rainbow color scheme creating a spectrum-inspired color palette.
SchemeTonalSpot
A tonal spot color scheme emphasizing the source color with tonal adjustments.
SchemeVibrant
A vibrant color scheme with saturated, bold colors.

Enums§

Platform
Platform identifier for dynamic scheme. Only used in the 2025 spec.
SpecVersion
Specification version for dynamic scheme.
Variant
Enumeration of dynamic color scheme variants for Material Design 3.