Design Tokens
Last updated on 2026-05-31
The LMS Starter Kit uses oklch color tokens defined as CSS custom properties in app/globals.css. All components reference these tokens through Tailwind CSS v4 — never hardcoded colors.
Color Tokens
Semantic color tokens that automatically adapt between light and dark mode:
:root {
--background: ...;
--foreground: ...;
--card: ...;
--card-foreground: ...;
--popover: ...;
--popover-foreground: ...;
--primary: ...;
--primary-foreground: ...;
--secondary: ...;
--secondary-foreground: ...;
--muted: ...;
--muted-foreground: ...;
--accent: ...;
--accent-foreground: ...;
--destructive: ...;
--destructive-foreground: ...;
--border: ...;
--input: ...;
--ring: ...;
}
Sidebar Tokens
--sidebar-background: ...;
--sidebar-foreground: ...;
--sidebar-primary: ...;
--sidebar-primary-foreground: ...;
--sidebar-accent: ...;
--sidebar-accent-foreground: ...;
--sidebar-border: ...;
--sidebar-ring: ...;
Chart Colors
--chart-1: ...; --chart-2: ...; --chart-3: ...; --chart-4: ...; --chart-5: ...;
Usage in Tailwind
<div className="bg-background text-foreground border-border">
<button className="bg-primary text-primary-foreground">
Enroll Now
</button>
<span className="text-muted-foreground">42 students enrolled</span>
</div>
Dark Mode
Toggle dark mode using the theme button in the header:
import { useTheme } from "next-themes"
const { theme, setTheme } = useTheme()
setTheme(theme === "dark" ? "light" : "dark")
Dark mode values are defined in the .dark selector within globals.css. The kit uses next-themes with class-based dark mode.
Why oklch?
The kit uses oklch (Oklab Lightness Chroma Hue) instead of hex or hsl:
- Perceptually uniform — equal steps in lightness look equal to the human eye
- Wider gamut — access to more vibrant colors on modern displays
- Easy palette generation — adjust hue angle to create a cohesive brand palette
Customizing for Your Brand
Update app/globals.css to change colors project-wide:
:root {
--primary: oklch(0.55 0.2 160); /* Teal brand color */
--primary-foreground: oklch(0.98 0 0); /* White text on primary */
}
.dark {
--primary: oklch(0.7 0.18 160); /* Lighter in dark mode */
--primary-foreground: oklch(0.98 0 0);
}
All components automatically inherit the new palette — buttons, badges, links, charts, progress bars, and focus rings all update at once.
For full customization details, see the Customization guide.