mcu-dynamiccolor 0.2.2

Dynamic color system for Material Design 3
Documentation
// <FILE>crates/mcu-dynamiccolor/src/lib.rs</FILE> - <DESC>Dynamic color system</DESC>
// <VERS>VERSION: 3.0.0</VERS>
// <WCTX>OFPF refactor: Split large files into trait + separate impl modules</WCTX>
// <CLOG>Add impl_palettes_2021, impl_palettes_2025, impl_calc_2021, impl_calc_2025 modules for OFPF compliance</CLOG>

// Allow patterns that are intentional in this port from TypeScript/Java
#![allow(clippy::type_complexity)] // Complex closure types match upstream API
#![allow(clippy::collapsible_else_if)] // Matches upstream code structure
#![allow(clippy::if_same_then_else)] // Intentional pattern for future differentiation
#![allow(clippy::manual_range_contains)] // Matches upstream explicit comparisons

//! # MCU Dynamic Color
//!
//! Dynamic color system for Material Design 3.
//!
//! Provides runtime color resolution based on:
//! - Source color (theme seed)
//! - Variant (style: TonalSpot, Vibrant, etc.)
//! - Dark/light mode
//! - Contrast level (-1.0 to 1.0)
//! - Platform (phone, watch)
//!
//! ## Example
//!
//! ```
//! use mcu_dynamiccolor::{DynamicScheme, DynamicSchemeOptions, Variant};
//! use mcu_hct::Hct;
//!
//! // Create a scheme from a source color
//! let source_color = Hct::from_int(0xFF0000FF); // Blue
//! let options = DynamicSchemeOptions::new(
//!     source_color,
//!     Variant::TonalSpot,
//!     0.0,  // Normal contrast
//!     false // Light mode
//! );
//! let scheme = DynamicScheme::new(options);
//!
//! // Access palettes
//! let primary_palette = &scheme.primary_palette;
//! let surface_tone = primary_palette.get_hct(40);
//! ```

mod color_calculation;
mod color_spec;
mod color_spec_2021;
mod color_spec_2025;
mod contrast_curve;
mod dynamic_color;
mod dynamic_scheme;
mod dynamic_scheme_palettes;
mod impl_calc_2021;
mod impl_calc_2025;
mod impl_palettes_2021;
mod impl_palettes_2025;
mod material_dynamic_colors;
mod tone_delta_pair;
mod variant;

pub use color_calculation::{
    get_spec, ColorCalculationDelegate, ColorCalculationDelegate2021, ColorCalculationDelegate2025,
};
pub use color_spec::ColorSpecDelegate;
pub use color_spec_2021::ColorSpecDelegateImpl2021;
pub use color_spec_2025::ColorSpecDelegateImpl2025;
pub use contrast_curve::ContrastCurve;
pub use dynamic_color::{DynamicColor, DynamicColorError};
pub use dynamic_scheme::{DynamicScheme, DynamicSchemeOptions, Platform, SpecVersion};
pub use dynamic_scheme_palettes::{
    get_palettes_spec, get_rotated_hue, maybe_fallback_spec_version, DynamicSchemePalettesDelegate,
    DynamicSchemePalettesDelegateImpl2021, DynamicSchemePalettesDelegateImpl2025,
};
pub use material_dynamic_colors::MaterialDynamicColors;
pub use tone_delta_pair::{DeltaConstraint, ToneDeltaPair, TonePolarity};
pub use variant::Variant;

// <FILE>crates/mcu-dynamiccolor/src/lib.rs</FILE> - <DESC>Dynamic color system</DESC>
// <VERS>END OF VERSION: 3.0.0</VERS>