Official is a shadcn/ui theme built around a green primary color (#618132) with green accents (#3a8132). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#618132) on a neutral background (#030401).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030401black |
| Foreground | #060802black | #f8faf5whitesmoke |
| Card | #fcfcfcsnow | #060802black |
| Card foreground | #030401black | #fafbf8snow |
| Popover | #fcfcfcsnow | #060802black |
| Popover foreground | #030401black | #fafbf8snow |
| Primary | #618132olivedrab | #618132olivedrab |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #817932olivedrab | #817932olivedrab |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #eeecddbeige | #222011black |
| Muted foreground | #6e6d5edimgray | #a1a091darkgray |
| Accent | #3a8132forestgreen | #3a8132forestgreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #a73d0csaddlebrown | #e55310chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #618132olivedrab | #618132olivedrab |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.12:1 | AAA |
| Text on card | 20.11:1 | AAA |
| Primary button | 4.49:1 | AA Large |
| Secondary button | 4.47:1 | AA Large |
| Muted text | 4.41:1 | AA Large |
| Accent | 4.83:1 | AA |
| Destructive | 6.34:1 | AA |
| Text on background | 19.56:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 4.49:1 | AA Large |
| Secondary button | 4.47:1 | AA Large |
| Muted text | 6.17:1 | AA |
| Accent | 4.83:1 | AA |
| Destructive | 3.76:1 | AA Large |
Paste this into your globals.css to use Official in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.127 0.017 123.702);
--muted: oklch(0.942 0.021 101.629);
--muted-foreground: oklch(0.53 0.022 101.921);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.1 0.014 123.702);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.1 0.014 123.702);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.56 0.113 127.953);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.567 0.092 102.997);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.538 0.134 141.705);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.503 0.15 40.476);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.56 0.113 127.953);
--chart-1: oklch(0.56 0.113 127.953);
--chart-2: oklch(0.567 0.092 102.997);
--chart-3: oklch(0.538 0.134 141.705);
--chart-4: oklch(0.602 0.098 102.996);
--chart-5: oklch(0.567 0.119 128.19);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.101 0.015 123.669);
--foreground: oklch(0.982 0.007 124.441);
--muted: oklch(0.242 0.027 102.749);
--muted-foreground: oklch(0.701 0.021 101.745);
--popover: oklch(0.127 0.018 123.669);
--popover-foreground: oklch(0.988 0.004 124.408);
--card: oklch(0.127 0.018 123.669);
--card-foreground: oklch(0.988 0.004 124.408);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.56 0.113 127.953);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.567 0.092 102.997);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.538 0.134 141.705);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.632 0.193 39.954);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.56 0.113 127.953);
--chart-1: oklch(0.56 0.113 127.953);
--chart-2: oklch(0.567 0.092 102.997);
--chart-3: oklch(0.538 0.134 141.705);
--chart-4: oklch(0.602 0.098 102.996);
--chart-5: oklch(0.567 0.119 128.19);
}