mcu_scheme/lib.rs
1// <FILE>crates/mcu-scheme/src/lib.rs</FILE> - <DESC>Color scheme variants</DESC>
2// <VERS>VERSION: 2.0.0</VERS>
3// <WCTX>Pre-built color scheme variants</WCTX>
4// <CLOG>Implement all 9 scheme wrappers with DynamicScheme integration</CLOG>
5
6//! # MCU Scheme
7//!
8//! Pre-built color scheme variants for Material Design 3.
9//!
10//! Each scheme wraps `DynamicScheme` with a specific `Variant`:
11//! - [`SchemeMonochrome`]: Grayscale palette for minimalist designs
12//! - [`SchemeNeutral`]: Low chroma, subtle colors for professional designs
13//! - [`SchemeTonalSpot`]: Balanced, versatile (default for Material Design 3)
14//! - [`SchemeVibrant`]: High chroma, bold colors for energetic designs
15//! - [`SchemeExpressive`]: Playful with hue shifts for artistic designs
16//! - [`SchemeFidelity`]: True to source color for accurate color representation
17//! - [`SchemeContent`]: Content-aware colors for image-derived themes
18//! - [`SchemeRainbow`]: High chroma with tertiary shift for playful designs
19//! - [`SchemeFruitSalad`]: Playful hue variations for fun designs
20//!
21//! ## Example
22//!
23//! ```
24//! use mcu_scheme::SchemeTonalSpot;
25//! use mcu_hct::Hct;
26//!
27//! // Create a tonal spot scheme from a blue source color
28//! let source = Hct::from_int(0xFF0000FF);
29//! let scheme = SchemeTonalSpot::new(source, false, 0.0);
30//!
31//! // Access underlying DynamicScheme through Deref
32//! assert!(!scheme.is_dark);
33//! let _primary = &scheme.primary_palette;
34//! ```
35
36mod scheme_content;
37mod scheme_expressive;
38mod scheme_fidelity;
39mod scheme_fruit_salad;
40mod scheme_monochrome;
41mod scheme_neutral;
42mod scheme_rainbow;
43mod scheme_tonal_spot;
44mod scheme_vibrant;
45
46pub use scheme_content::SchemeContent;
47pub use scheme_expressive::SchemeExpressive;
48pub use scheme_fidelity::SchemeFidelity;
49pub use scheme_fruit_salad::SchemeFruitSalad;
50pub use scheme_monochrome::SchemeMonochrome;
51pub use scheme_neutral::SchemeNeutral;
52pub use scheme_rainbow::SchemeRainbow;
53pub use scheme_tonal_spot::SchemeTonalSpot;
54pub use scheme_vibrant::SchemeVibrant;
55
56// Re-export commonly used types from mcu-dynamiccolor for convenience
57pub use mcu_dynamiccolor::{DynamicScheme, Platform, SpecVersion, Variant};
58
59// <FILE>crates/mcu-scheme/src/lib.rs</FILE> - <DESC>Color scheme variants</DESC>
60// <VERS>END OF VERSION: 2.0.0</VERS>