Struct UiTheme
pub struct UiTheme {Show 34 fields
pub background: [f32; 4],
pub surface: [f32; 4],
pub surface_elevated: [f32; 4],
pub surface_interactive: [f32; 4],
pub surface_active: [f32; 4],
pub separator: [f32; 4],
pub border: [f32; 4],
pub border_strong: [f32; 4],
pub text: [f32; 4],
pub text_dim: [f32; 4],
pub text_muted: [f32; 4],
pub text_disabled: [f32; 4],
pub text_inverse: [f32; 4],
pub primary: [f32; 4],
pub primary_dim: [f32; 4],
pub accent_a: [f32; 4],
pub accent_b: [f32; 4],
pub accent_c: [f32; 4],
pub success: [f32; 4],
pub warning: [f32; 4],
pub error: [f32; 4],
pub axis_x: [f32; 4],
pub axis_y: [f32; 4],
pub axis_z: [f32; 4],
pub radius_sm: f32,
pub radius_md: f32,
pub radius_lg: f32,
pub radius_xl: f32,
pub font_size_caption: f32,
pub font_size_body: f32,
pub font_size_title: f32,
pub font_size_display: f32,
pub pad_row: f32,
pub pad_card: f32,
}Expand description
Color palette and sizing tokens for any Khora UI surface.
Fields§
§background: [f32; 4]Outermost background (empty regions, behind everything).
surface: [f32; 4]Default panel surface.
surface_elevated: [f32; 4]Slightly elevated surface (e.g. tab bar, card body).
surface_interactive: [f32; 4]Interactive surface (buttons, combo boxes).
surface_active: [f32; 4]Hovered or active surface highlight.
separator: [f32; 4]Subtle separator (between items inside a panel).
border: [f32; 4]Default panel border.
border_strong: [f32; 4]Stronger border (used for emphasis around modals, popups).
text: [f32; 4]Primary text color.
text_dim: [f32; 4]Secondary text (labels, sub-titles).
text_muted: [f32; 4]Tertiary text (hints, captions).
text_disabled: [f32; 4]Disabled text.
text_inverse: [f32; 4]Dark “inverse” ink for text sitting on a filled brand (primary)
surface — e.g. the label of a solid silver primary button.
primary: [f32; 4]Primary brand color (selection rings, focus highlights).
primary_dim: [f32; 4]Dimmed primary (backgrounds of selected rows, etc.).
accent_a: [f32; 4]Accent A — secondary brand color.
accent_b: [f32; 4]Accent B — tertiary brand color.
accent_c: [f32; 4]Accent C — quaternary brand color (warnings of-emphasis, special states).
success: [f32; 4]Success indicator (green-family).
warning: [f32; 4]Warning indicator (amber-family).
error: [f32; 4]Error indicator (red-family).
axis_x: [f32; 4]Color for the X axis (typically red-orange).
axis_y: [f32; 4]Color for the Y axis (typically green).
axis_z: [f32; 4]Color for the Z axis (typically blue).
radius_sm: f32Small corner radius (chips, badges).
radius_md: f32Medium corner radius (default for buttons / inputs).
radius_lg: f32Large corner radius (panels, cards).
radius_xl: f32Extra-large corner radius (modal dialogs, palettes).
font_size_caption: f32Caption / metadata font size in logical points.
font_size_body: f32Body / default font size.
font_size_title: f32Section title font size.
font_size_display: f32Display heading font size.
pad_row: f32Default vertical padding for a row of content.
pad_card: f32Default inner padding for a card.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiTheme
impl RefUnwindSafe for UiTheme
impl Send for UiTheme
impl Sync for UiTheme
impl Unpin for UiTheme
impl UnsafeUnpin for UiTheme
impl UnwindSafe for UiTheme
Blanket Implementations§
§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
§fn on_start(&mut self, ctx: &mut dyn AppContext)
fn on_start(&mut self, ctx: &mut dyn AppContext)
update. Apps install their theme / fonts here.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.