Skip to main content

NeutralRamp

Struct NeutralRamp 

Source
pub struct NeutralRamp {
Show 19 fields pub window: Color, pub subtle: Color, pub panel: Color, pub overlay: Color, pub control: Color, pub control_hover: Color, pub control_active: Color, pub button: Color, pub button_hover: Color, pub button_active: Color, pub field: Color, pub border_subtle: Color, pub border: Color, pub border_strong: Color, pub border_control: Color, pub text: Color, pub text_secondary: Color, pub text_tertiary: Color, pub text_disabled: Color,
}
Expand description

Every structural tier of a theme: surfaces, neutral fills, borders, and ink. Built-in themes author these directly so each preset can choose pure or subtly tinted neutrals; widgets never derive structure from the brand color.

Fields§

§window: Color

Application background behind panels.

§subtle: Color

Recessed chrome: sidebars, title bars, table headers.

§panel: Color

Cards, panes, and other content surfaces.

§overlay: Color

Floating chrome that lifts off the panel, such as tooltips. Menus, popovers, and dialogs paint the panel tier with a border and shadow.

§control: Color

Recessed neutral fill for tracks, tab strips, chips, and nested areas.

§control_hover: Color§control_active: Color§button: Color

Face of neutral buttons, select triggers, and raised segment thumbs.

§button_hover: Color§button_active: Color§field: Color

Text input well.

§border_subtle: Color

Hairlines inside components.

§border: Color

Default separators and container outlines.

§border_strong: Color

Outlines of interactive controls such as buttons and fields.

§border_control: Color

Outline of unselected checkboxes, radios, and switch tracks; at least 3:1 against the panel so the control boundary stays perceivable.

§text: Color§text_secondary: Color§text_tertiary: Color

Placeholder and tertiary metadata; at least 4.5:1 on the panel.

§text_disabled: Color

Implementations§

Source§

impl NeutralRamp

Source

pub fn light() -> Self

Pure achromatic light ramp shared by the SUI and neutral light presets.

Source

pub fn dark() -> Self

SUI dark ramp: a constant, faint blue tint (OKLCH hue 258, chroma ~0.016) over evenly spaced lightness steps.

Source

pub fn neutral_dark() -> Self

Achromatic twin of Self::dark with identical lightness steps.

Source

pub fn void() -> Self

True-black OLED ramp: window, chrome, and panels stay black and are separated by borders; only interactive fills lift off black, carrying the same faint tint as Self::dark. Text is dimmed below pure white.

Trait Implementations§

Source§

impl Clone for NeutralRamp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for NeutralRamp

Source§

impl Debug for NeutralRamp

Source§

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

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

impl PartialEq for NeutralRamp

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NeutralRamp

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.