pub struct AdminTheme {
pub accent: String,
pub bg: String,
pub surface: String,
pub text: String,
pub text_muted: String,
pub border: String,
}Expand description
1.8.2 — full admin chrome palette. Each field maps onto one of the
framework’s --rio-* design tokens defined in admin/base.html,
so overriding these values via Admin::theme(...) re-skins the
entire admin shell (topbar, sidebar, body, cards, headings, hairlines)
without touching CSS or rebuilding Tailwind.
Defaults match the framework’s current chrome so a project that
doesn’t call .theme(...) renders unchanged. Operators typically
override 1–3 fields and let the rest default:
admin.theme(AdminTheme {
accent: "#1e6ba8".into(),
topbar: "#1e3a5f".into(),
bg: "#f0f5fa".into(),
..AdminTheme::default()
})Hex form (#rrggbb or rrggbb); leading # is auto-normalised
at render time. Malformed values fall back to framework defaults
rather than panic — the admin path never breaks over a config typo.
Fields§
§accent: StringPrimary brand colour. Drives --rio-accent (logo mark, focus
rings, primary buttons, badges) AND the --ds-color-accent
CSS variable (for Tailwind utilities that bake the accent
with opacity, like bg-accent/10).
bg: StringPage background. Drives --rio-bg — the canvas behind the
shell on every admin page.
surface: StringCard / topbar / sidebar surface. Drives --rio-bg-surface-1 —
the colour of the topbar background and any elevated surface.
text: StringBody text colour. Drives --rio-text — body copy AND the
“skip-to-content” link AND the topbar brand title.
text_muted: StringSecondary / supporting text. Drives --rio-text-muted — the
“signed in as …” line, table hints, and most metadata labels.
border: StringBorder / hairline colour. Drives --rio-border — every visible
hairline on cards, the topbar bottom-border, and table dividers.
Trait Implementations§
Source§impl Clone for AdminTheme
impl Clone for AdminTheme
Source§fn clone(&self) -> AdminTheme
fn clone(&self) -> AdminTheme
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdminTheme
impl Debug for AdminTheme
Source§impl Default for AdminTheme
impl Default for AdminTheme
Source§impl PartialEq for AdminTheme
impl PartialEq for AdminTheme
impl Eq for AdminTheme
impl StructuralPartialEq for AdminTheme
Auto Trait Implementations§
impl Freeze for AdminTheme
impl RefUnwindSafe for AdminTheme
impl Send for AdminTheme
impl Sync for AdminTheme
impl Unpin for AdminTheme
impl UnsafeUnpin for AdminTheme
impl UnwindSafe for AdminTheme
Blanket Implementations§
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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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