Mandarin is a shadcn/ui theme built around a green primary color (#198f19) with red accents (#8f1919). The light mode uses a neutral background (#f6fdf6). Dark mode keeps the green primary (#198f19) on a neutral background (#030703).
| Token | Light | Dark |
|---|---|---|
| Background | #f6fdf6mintcream | #030703black |
| Foreground | #000000black | #f5f9f5whitesmoke |
| Card | #f2fdf2honeydew | #050b05black |
| Card foreground | #000000black | #f8fbf8mintcream |
| Popover | #f6fdf6mintcream | #030703black |
| Popover foreground | #000000black | #f5f9f5whitesmoke |
| Primary | #198f19forestgreen | #198f19forestgreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #19198fmidnightblue | #19198fmidnightblue |
| Secondary foreground | #e1e1falavender | #e1e1falavender |
| Muted | #ededf2whitesmoke | #0d0d12black |
| Muted foreground | #424243darkslategray | #bcbcbdsilver |
| Accent | #8f1919brown | #8f1919brown |
| Accent foreground | #fae1e1mistyrose | #fae1e1mistyrose |
| Destructive | #6f210bmaroon | #e9481corangered |
| Destructive foreground | #f8c3b5lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #198f19forestgreen | #198f19forestgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.37:1 | AAA |
| Text on card | 20.06:1 | AAA |
| Primary button | 4.20:1 | AA Large |
| Secondary button | 10.34:1 | AAA |
| Muted text | 8.63:1 | AAA |
| Accent | 7.28:1 | AAA |
| Destructive | 7.08:1 | AAA |
| Text on background | 19.05:1 | AAA |
| Text on card | 19.10:1 | AAA |
| Primary button | 4.20:1 | AA Large |
| Secondary button | 10.34:1 | AAA |
| Muted text | 10.21:1 | AAA |
| Accent | 7.28:1 | AAA |
| Destructive | 3.89:1 | AA Large |
Paste this into your globals.css to use Mandarin in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.012 145.485);
--foreground: oklch(0 0 0);
--muted: oklch(0.949 0.006 286.282);
--muted-foreground: oklch(0.378 0.002 286.293);
--popover: oklch(0.988 0.012 145.485);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.982 0.018 145.438);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.567 0.18 142.733);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.326 0.183 270.202);
--secondary-foreground: oklch(0.916 0.034 285.713);
--accent: oklch(0.423 0.153 26.817);
--accent-foreground: oklch(0.929 0.028 17.659);
--destructive: oklch(0.369 0.115 35.536);
--destructive-foreground: oklch(0.861 0.064 35.983);
--ring: oklch(0.567 0.18 142.733);
--chart-1: oklch(0.567 0.18 142.733);
--chart-2: oklch(0.326 0.183 270.202);
--chart-3: oklch(0.423 0.153 26.817);
--chart-4: oklch(0.345 0.196 269.961);
--chart-5: oklch(0.574 0.185 142.692);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.018 144.385);
--foreground: oklch(0.979 0.007 145.52);
--muted: oklch(0.161 0.01 285.271);
--muted-foreground: oklch(0.796 0.002 286.358);
--popover: oklch(0.12 0.018 144.385);
--popover-foreground: oklch(0.979 0.007 145.52);
--card: oklch(0.138 0.02 144.383);
--card-foreground: oklch(0.986 0.005 145.539);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.567 0.18 142.733);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.326 0.183 270.202);
--secondary-foreground: oklch(0.916 0.034 285.713);
--accent: oklch(0.423 0.153 26.817);
--accent-foreground: oklch(0.929 0.028 17.659);
--destructive: oklch(0.626 0.204 35.166);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.567 0.18 142.733);
--chart-1: oklch(0.567 0.18 142.733);
--chart-2: oklch(0.326 0.183 270.202);
--chart-3: oklch(0.423 0.153 26.817);
--chart-4: oklch(0.345 0.196 269.961);
--chart-5: oklch(0.574 0.185 142.692);
}