pub enum DynamicSchemeVariant {
TonalSpot,
Fidelity,
Monochrome,
Neutral,
Vibrant,
Expressive,
Content,
Rainbow,
FruitSalad,
}Expand description
The algorithm used to construct a ColorScheme in ColorScheme::from_seed.
The tonalSpot variant builds default Material scheme colors. These colors are
mapped to light or dark tones to achieve visually accessible color
pairings with sufficient contrast between foreground and background elements.
In some cases, the tones can prevent colors from appearing as intended,
such as when a color is too light to offer enough contrast for accessibility.
Color fidelity (DynamicSchemeVariant.fidelity) is a feature that adjusts
tones in these cases to produce the intended visual results without harming
visual contrast.
Variants§
TonalSpot
Default for Material theme colors. Builds pastel palettes with a low chroma.
Fidelity
The resulting color palettes match seed color, even if the seed color is very bright (high chroma).
Monochrome
All colors are grayscale, no chroma.
Neutral
Close to grayscale, a hint of chroma.
Vibrant
Pastel colors, high chroma palettes. The primary palette’s chroma is at
maximum. Use fidelity instead if tokens should alter their tone to match
the palette vibrancy.
Expressive
Pastel colors, medium chroma palettes. The primary palette’s hue is different from the seed color, for variety.
Content
Almost identical to fidelity. Tokens and palettes match the seed color.
ColorScheme::primary_container is the seed color, adjusted to ensure
contrast with surfaces. The tertiary palette is analogue of the seed color.
Rainbow
A playful theme - the seed color’s hue does not appear in the theme.
FruitSalad
A playful theme - the seed color’s hue does not appear in the theme.
Implementations§
Source§impl DynamicSchemeVariant
impl DynamicSchemeVariant
Sourcepub const VALUES: [DynamicSchemeVariant; 9]
pub const VALUES: [DynamicSchemeVariant; 9]
Dart’s DynamicSchemeVariant.values, in declaration order.
Trait Implementations§
Source§impl Clone for DynamicSchemeVariant
impl Clone for DynamicSchemeVariant
impl Copy for DynamicSchemeVariant
Source§impl Debug for DynamicSchemeVariant
impl Debug for DynamicSchemeVariant
impl Eq for DynamicSchemeVariant
Source§impl Hash for DynamicSchemeVariant
impl Hash for DynamicSchemeVariant
Source§impl PartialEq for DynamicSchemeVariant
impl PartialEq for DynamicSchemeVariant
impl StructuralPartialEq for DynamicSchemeVariant
Auto Trait Implementations§
impl Forget for DynamicSchemeVariant
impl Freeze for DynamicSchemeVariant
impl Move for DynamicSchemeVariant
impl RefUnwindSafe for DynamicSchemeVariant
impl Send for DynamicSchemeVariant
impl Sync for DynamicSchemeVariant
impl Unpin for DynamicSchemeVariant
impl UnsafeUnpin for DynamicSchemeVariant
impl UnwindSafe for DynamicSchemeVariant
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.