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.
Members
ANDROID_SYSTEM_TONES
const ANDROID_SYSTEM_TONES: [u8; 13]
Tones exposed as the thirteen Android 12 system accent/neutral resources.
ANDROID_NEUTRAL_TONES
const ANDROID_NEUTRAL_TONES: [u8; 24]
The complete neutral range read or calculated by AndroidX Material3.
from_tones
fn from_tones(tones: impl IntoIterator<Item = (u8, Color)>) -> Result<Self, MaterialDynamicColorError>
from_colors
fn from_colors(tones: [Color; 101]) -> Self
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.
tone
fn tone(self: &Self, tone: u8) -> Option<Color>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherEquivalent<K>CastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>CloneDebugStructuralPartialEqPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.