DynamicScheme

Struct DynamicScheme 

Source
pub struct DynamicScheme { /* private fields */ }

Implementations§

Source§

impl DynamicScheme

Source

pub const fn default_spec_version() -> SpecVersion

Source

pub const fn default_platform() -> Platform

Source

pub fn get_piecewise_value( source_color_hct: &Hct, hue_breakpoints: &[f64], hues: &[f64], ) -> f64

Source

pub fn get_rotated_hue( source_color_hct: &Hct, hue_breakpoints: &[f64], rotations: &[f64], ) -> f64

Source

pub fn new( source_color_hct: Hct, variant: Variant, is_dark: bool, platform: Platform, contrast_level: f64, spec_version: SpecVersion, primary_palette: TonalPalette, secondary_palette: TonalPalette, tertiary_palette: TonalPalette, neutral_palette: TonalPalette, neutral_variant_palette: TonalPalette, error_palette: TonalPalette, ) -> Self

Source

pub fn source_color_argb(&self) -> u32

Source

pub fn source_color_hct(&self) -> &Hct

Source

pub fn variant(&self) -> &Variant

Source

pub fn is_dark(&self) -> bool

Source

pub fn platform(&self) -> &Platform

Source

pub fn contrast_level(&self) -> f64

Source

pub fn spec_version(&self) -> &SpecVersion

Source

pub fn primary_palette(&self) -> &TonalPalette

Source

pub fn secondary_palette(&self) -> &TonalPalette

Source

pub fn tertiary_palette(&self) -> &TonalPalette

Source

pub fn neutral_palette(&self) -> &TonalPalette

Source

pub fn neutral_variant_palette(&self) -> &TonalPalette

Source

pub fn error_palette(&self) -> &TonalPalette

Source

pub fn get_hct<'a>(&'a self, dynamic_color: &'a DynamicColor<'a>) -> Hct

Source

pub fn get_argb<'a>(&'a self, dynamic_color: &'a DynamicColor<'a>) -> u32

Source

pub fn primary_palette_key_color(&self) -> u32

Source

pub fn secondary_palette_key_color(&self) -> u32

Source

pub fn tertiary_palette_key_color(&self) -> u32

Source

pub fn neutral_palette_key_color(&self) -> u32

Source

pub fn neutral_variant_palette_key_color(&self) -> u32

Source

pub fn error_palette_key_color(&self) -> u32

Source

pub fn background(&self) -> u32

Source

pub fn on_background(&self) -> u32

Source

pub fn surface(&self) -> u32

Source

pub fn surface_dim(&self) -> u32

Source

pub fn surface_bright(&self) -> u32

Source

pub fn surface_container_lowest(&self) -> u32

Source

pub fn surface_container_low(&self) -> u32

Source

pub fn surface_container(&self) -> u32

Source

pub fn surface_container_high(&self) -> u32

Source

pub fn surface_container_highest(&self) -> u32

Source

pub fn on_surface(&self) -> u32

Source

pub fn surface_variant(&self) -> u32

Source

pub fn on_surface_variant(&self) -> u32

Source

pub fn inverse_surface(&self) -> u32

Source

pub fn inverse_on_surface(&self) -> u32

Source

pub fn outline(&self) -> u32

Source

pub fn outline_variant(&self) -> u32

Source

pub fn shadow(&self) -> u32

Source

pub fn scrim(&self) -> u32

Source

pub fn surface_tint(&self) -> u32

Source

pub fn primary(&self) -> u32

Source

pub fn primary_dim(&self) -> u32

Source

pub fn on_primary(&self) -> u32

Source

pub fn primary_container(&self) -> u32

Source

pub fn on_primary_container(&self) -> u32

Source

pub fn inverse_primary(&self) -> u32

Source

pub fn primary_fixed(&self) -> u32

Source

pub fn primary_fixed_dim(&self) -> u32

Source

pub fn on_primary_fixed(&self) -> u32

Source

pub fn on_primary_fixed_variant(&self) -> u32

Source

pub fn secondary(&self) -> u32

Source

pub fn secondary_dim(&self) -> u32

Source

pub fn on_secondary(&self) -> u32

Source

pub fn secondary_container(&self) -> u32

Source

pub fn on_secondary_container(&self) -> u32

Source

pub fn secondary_fixed(&self) -> u32

Source

pub fn secondary_fixed_dim(&self) -> u32

Source

pub fn on_secondary_fixed(&self) -> u32

Source

pub fn on_secondary_fixed_variant(&self) -> u32

Source

pub fn tertiary(&self) -> u32

Source

pub fn tertiary_dim(&self) -> u32

Source

pub fn on_tertiary(&self) -> u32

Source

pub fn tertiary_container(&self) -> u32

Source

pub fn on_tertiary_container(&self) -> u32

Source

pub fn tertiary_fixed(&self) -> u32

Source

pub fn tertiary_fixed_dim(&self) -> u32

Source

pub fn on_tertiary_fixed(&self) -> u32

Source

pub fn on_tertiary_fixed_variant(&self) -> u32

Source

pub fn error(&self) -> u32

Source

pub fn error_dim(&self) -> u32

Source

pub fn on_error(&self) -> u32

Source

pub fn error_container(&self) -> u32

Source

pub fn on_error_container(&self) -> u32

Source

pub fn control_activated(&self) -> u32

Source

pub fn control_normal(&self) -> u32

Source

pub fn control_highlight(&self) -> u32

Source

pub fn text_primary_inverse(&self) -> u32

Source

pub fn text_secondary_and_tertiary_inverse(&self) -> u32

Source

pub fn text_primary_inverse_disable_only(&self) -> u32

Source

pub fn text_secondary_and_tertiary_inverse_disabled(&self) -> u32

Source

pub fn text_hint_inverse(&self) -> u32

Trait Implementations§

Source§

impl Clone for DynamicScheme

Source§

fn clone(&self) -> DynamicScheme

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DynamicScheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DynamicScheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&DynamicScheme> for DynamicSchemeBuilder

Source§

fn from(value: &DynamicScheme) -> Self

Converts to this type from the input type.
Source§

impl From<DynamicScheme> for DynamicSchemeBuilder

Source§

fn from(value: DynamicScheme) -> Self

Converts to this type from the input type.
Source§

impl Hash for DynamicScheme

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for DynamicScheme

Source§

fn eq(&self, other: &DynamicScheme) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for DynamicScheme

Source§

impl StructuralPartialEq for DynamicScheme

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.