Home / Docs / Theming‹›

Theming

Semantic tokens + NativeWind. Light and dark out of the box.

Provider

import { ThemeProvider } from "@lumioui/core";

<ThemeProvider forcedScheme="dark">
  <App />
</ThemeProvider>

forcedScheme overrides system. themeOverrides merges custom colors. useTheme().colors only when a color can't be a class (e.g. ActivityIndicator, interpolateColor).

Classes

<View className="bg-card border-border rounded-2xl" />
<Text className="text-foreground text-sm" />
<Text className="text-muted-foreground" />

Accents

Primary is neutral ink by default — near-black on light, near-white on dark — so colour belongs to content, not chrome. Give a component, a screen or a whole flow its own colour with Accent: every bg-primary, text-primary-text, focus ring and useTheme().colors.primary below it follows, in both schemes. One accent per screen.

import { Accent } from "@lumioui/core";

<Accent color="blue">
  <Button>Send $240.00</Button>
</Accent>

<Accent color="#FF5A1F">…</Accent>  // any hex — text colour picked by contrast

Curated accents clear WCAG AA for their on-colour, with a lifted tint for accent-coloured text on dark surfaces:

blueindigovioletpinkredcoralorangeamberlimegreenminttealsky

Token reference

Every semantic token and its value in both modes — these are the source values, not a copy.

tokenclasslightdark
backgroundapp canvasbg-background#F5F5F7#0A0A0B
foregroundprimary textbg-foreground#0A0A0B#F5F5F7
cardcard surfacesbg-card#FFFFFF#18181B
card-foregroundtext on cardsbg-card-foreground#0A0A0B#F5F5F7
popoverfloating menusbg-popover#FFFFFF#1F1F23
popover-foregroundtext in overlaysbg-popover-foreground#0A0A0B#F5F5F7
primaryprimary actionsbg-primary#0A0A0B#F5F5F7
primary-foregroundtext on primarybg-primary-foreground#FFFFFF#0A0A0B
secondarysecondary surfacesbg-secondary#EDEDF0#232327
secondary-foregroundtext on secondarybg-secondary-foreground#18181B#F5F5F7
mutedrecessed surfacesbg-muted#EDEDF0#232327
muted-foregroundsecondary textbg-muted-foreground#5E5E66#A1A1AA
accentaccent fillsbg-accent#EDEDF0#232327
accent-foregroundtext on accentbg-accent-foreground#18181B#F5F5F7
destructivedestructive actionsbg-destructive#DD3036#E5484D
destructive-foregroundtext on destructivebg-destructive-foreground#FFFFFF#FFFFFF
successsuccess statesbg-success#1F8552#27A566
success-foregroundtext on successbg-success-foreground#FFFFFF#0A0A0B
warningwarning statesbg-warning#FAAA1E#F4B232
warning-foregroundtext on warningbg-warning-foreground#18181B#18181B
borderhairlinesbg-border#E4E4E8#2A2A2F
inputfield bordersbg-input#E4E4E8#2A2A2F
ringfocus ringsbg-ring#0A84FF#0A84FF
overlayscrim / backdropbg-overlayrgba(10, 10, 11, 0.45)rgba(0, 0, 0, 0.6)

Chart palette

Categorical series — colors.chart1…chart5 in code, bg-chart-1…bg-chart-5 in className. Pink, teal, lime, red, amber — no blue or purple — tuned per mode (light shown):

chart-1chart-2chart-3chart-4chart-5
<BarChart data={week} palette={[colors.chart1, colors.chart3]} />
<View className="h-2.5 w-2.5 rounded-full bg-chart-2" />

Own tailwind config needs the mapping (kitchen-sink ships it): chart: { 1: 'hsl(var(--chart-1) / <alpha-value>)', … } with --chart-1…--chart-5 HSL vars in :root and .dark.

Category tints

Content colour that is not the accent — settings icon tiles, avatars, tags, legend dots. Twelve hues tuned as one family (equal visual weight, white glyphs read on all but amber and lime) and lifted slightly in dark mode, so tiles follow the scheme. Use bg-tint-orange instead of raw Tailwind palette classes like bg-orange-500; in code, colors.tintOrange (or <Icon color="tintOrange" />). Light, then dark:

redorangeamberlimegreentealskyblueindigovioletpinkslate
redorangeamberlimegreentealskyblueindigovioletpinkslate
<View className="h-8 w-8 items-center justify-center rounded-lg bg-tint-orange">
  <Icon name="plane" size="sm" color="#FFFFFF" />
</View>

Own tailwind config: tint: { red: 'hsl(var(--tint-red) / <alpha-value>)', … } with the --tint-* vars from the kitchen-sink global.css.

Radius

One scale everywhere — swatches render the real corner values:

none · 0
sm · 4
md · 8
lg · 12
xl · 16
2xl · 24
full · full

Touch targets follow platform guidelines: ios 44pt · android 48dp.

Dark mode

Tailwind darkMode: "class". Kitchen-sink toggles via ?theme=dark|light and setSchemeOverride(). Respect useReducedMotion() in custom animations.

// ask an llm