Skip to main content

ColorPalette

Struct ColorPalette 

Source
pub struct ColorPalette {
Show 34 fields pub background: [u8; 3], pub foreground: [u8; 3], pub card: [u8; 3], pub card_foreground: [u8; 3], pub popover: [u8; 3], pub popover_foreground: [u8; 3], pub primary: [u8; 3], pub primary_foreground: [u8; 3], pub secondary: [u8; 3], pub secondary_foreground: [u8; 3], pub muted: [u8; 3], pub muted_foreground: [u8; 3], pub accent: [u8; 3], pub accent_foreground: [u8; 3], pub destructive: [u8; 3], pub destructive_foreground: [u8; 3], pub border: [u8; 3], pub input: [u8; 3], pub ring: [u8; 3], pub chart_1: [u8; 3], pub chart_2: [u8; 3], pub chart_3: [u8; 3], pub chart_4: [u8; 3], pub chart_5: [u8; 3], pub hover: [u8; 3], pub focus: [u8; 3], pub sidebar: [u8; 3], pub sidebar_foreground: [u8; 3], pub sidebar_primary: [u8; 3], pub sidebar_primary_foreground: [u8; 3], pub sidebar_accent: [u8; 3], pub sidebar_accent_foreground: [u8; 3], pub sidebar_border: [u8; 3], pub sidebar_ring: [u8; 3],
}
Expand description

Color palette using shadcn/ui naming conventions All colors stored as [R, G, B] for serializability

Fields§

§background: [u8; 3]

Default background color

§foreground: [u8; 3]

Default foreground (text) color

§card: [u8; 3]

Card background color for elevated surfaces

§card_foreground: [u8; 3]

Card foreground (text) color

§popover: [u8; 3]

Popover background color

§popover_foreground: [u8; 3]

Popover foreground (text) color

§primary: [u8; 3]

Primary brand color

§primary_foreground: [u8; 3]

Primary foreground (text) color

§secondary: [u8; 3]

Secondary color

§secondary_foreground: [u8; 3]

Secondary foreground (text) color

§muted: [u8; 3]

Muted/subtle background color

§muted_foreground: [u8; 3]

Muted foreground (text) color

§accent: [u8; 3]

Accent color

§accent_foreground: [u8; 3]

Accent foreground (text) color

§destructive: [u8; 3]

Destructive/error color

§destructive_foreground: [u8; 3]

Destructive foreground (text) color

§border: [u8; 3]

Border color

§input: [u8; 3]

Input border color

§ring: [u8; 3]

Focus ring color

§chart_1: [u8; 3]

Chart color 1 for data visualization

§chart_2: [u8; 3]

Chart color 2 for data visualization

§chart_3: [u8; 3]

Chart color 3 for data visualization

§chart_4: [u8; 3]

Chart color 4 for data visualization

§chart_5: [u8; 3]

Chart color 5 for data visualization

§hover: [u8; 3]

Hover state color

§focus: [u8; 3]

Focus state color

§sidebar: [u8; 3]

Sidebar background color

§sidebar_foreground: [u8; 3]

Sidebar foreground (text) color

§sidebar_primary: [u8; 3]

Sidebar primary color

§sidebar_primary_foreground: [u8; 3]

Sidebar primary foreground (text) color

§sidebar_accent: [u8; 3]

Sidebar accent color

§sidebar_accent_foreground: [u8; 3]

Sidebar accent foreground (text) color

§sidebar_border: [u8; 3]

Sidebar border color

§sidebar_ring: [u8; 3]

Sidebar focus ring color

Trait Implementations§

Source§

impl Clone for ColorPalette

Source§

fn clone(&self) -> ColorPalette

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 ColorPalette

Source§

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

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

impl<'de> Deserialize<'de> for ColorPalette

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ColorPalette

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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, 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,