FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MaterialTonalPalette

    struct · ferroui-themes-material · v0.5.0

    struct MaterialTonalPalette
    

    An imported or HCT-generated tonal palette. Imported ARGB values are preserved exactly. Sparse palettes are supported, but scheme creation fails for missing tones.

    View source

    Members

    ANDROID_SYSTEM_TONES

    const ANDROID_SYSTEM_TONES: [u8; 13]
    

    Tones exposed as the thirteen Android 12 system accent/neutral resources.

    Source

    ANDROID_NEUTRAL_TONES

    const ANDROID_NEUTRAL_TONES: [u8; 24]
    

    The complete neutral range read or calculated by AndroidX Material3.

    Source

    from_tones

    fn from_tones(tones: impl IntoIterator<Item = (u8, Color)>) -> Result<Self, MaterialDynamicColorError>
    

    Source

    from_colors

    fn from_colors(tones: [Color; 101]) -> Self
    

    Source

    from_hct

    fn from_hct(hue: f64, chroma: f64) -> Result<Self, MaterialDynamicColorError>
    

    Generates all integer tones using the actual HCT gamut solver. Hue is normalized modulo 360; no RGB blending or fixed channel offsets are used.

    Source

    tone

    fn tone(self: &Self, tone: u8) -> Option<Color>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Equivalent<K>
    • CastableFrom<ST, Uninit, Uninit>
    • CastableFrom<ST, Initialized, Initialized>
    • Read<Exclusive, BecauseExclusive>
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.