String is a shadcn/ui theme built around a light green primary color (#d0e1b7) with light green accents (#bae1b7). The light mode uses a neutral background (#ffffff). Dark mode keeps the light green primary (#d0e1b7) on a neutral background (#060802).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060802black |
| Foreground | #0e1703black | #ffffffwhite |
| Card | #fcfcfcsnow | #080c04black |
| Card foreground | #0c1202black | #ffffffwhite |
| Popover | #ffffffwhite | #060802black |
| Popover foreground | #0e1703black | #ffffffwhite |
| Primary | #d0e1b7lightgrey | #d0e1b7lightgrey |
| Primary foreground | #37481edarkolivegreen | #37481edarkolivegreen |
| Secondary | #e1deb7wheat | #e1deb7wheat |
| Secondary foreground | #48451edarkolivegreen | #48451edarkolivegreen |
| Muted | #e4e3d2gainsboro | #2d2b1bdarkslategray |
| Muted foreground | #5b5949darkolivegreen | #b6b5a4darkgray |
| Accent | #bae1b7silver | #bae1b7silver |
| Accent foreground | #21481edarkslategray | #21481edarkslategray |
| Destructive | #b82514firebrick | #e94b3atomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #d0e1b7lightgrey | #d0e1b7lightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.38:1 | AAA |
| Text on card | 18.62:1 | AAA |
| Primary button | 7.19:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 5.45:1 | AA |
| Accent | 7.25:1 | AAA |
| Destructive | 6.36:1 | AA |
| Text on background | 20.14:1 | AAA |
| Text on card | 19.73:1 | AAA |
| Primary button | 7.19:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 6.88:1 | AA |
| Accent | 7.25:1 | AAA |
| Destructive | 3.79:1 | AA Large |
Paste this into your globals.css to use String in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.189 0.042 127.281);
--muted: oklch(0.912 0.022 102.596);
--muted-foreground: oklch(0.461 0.026 103.065);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.189 0.042 127.281);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.171 0.037 126.183);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.887 0.06 126.014);
--primary-foreground: oklch(0.377 0.07 128.126);
--secondary: oklch(0.893 0.052 103.097);
--secondary-foreground: oklch(0.384 0.058 104.068);
--accent: oklch(0.872 0.071 142.745);
--accent-foreground: oklch(0.363 0.083 142.078);
--destructive: oklch(0.508 0.185 30.502);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.887 0.06 126.014);
--chart-1: oklch(0.887 0.06 126.014);
--chart-2: oklch(0.893 0.052 103.097);
--chart-3: oklch(0.872 0.071 142.745);
--chart-4: oklch(0.909 0.044 102.963);
--chart-5: oklch(0.89 0.064 126.08);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.018 124.29);
--foreground: oklch(1 0 180);
--muted: oklch(0.286 0.028 103.598);
--muted-foreground: oklch(0.769 0.023 102.684);
--popover: oklch(0.127 0.018 124.29);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.146 0.021 124.517);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.887 0.06 126.014);
--primary-foreground: oklch(0.377 0.07 128.126);
--secondary: oklch(0.893 0.052 103.097);
--secondary-foreground: oklch(0.384 0.058 104.068);
--accent: oklch(0.872 0.071 142.745);
--accent-foreground: oklch(0.363 0.083 142.078);
--destructive: oklch(0.633 0.197 29.846);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.887 0.06 126.014);
--chart-1: oklch(0.887 0.06 126.014);
--chart-2: oklch(0.893 0.052 103.097);
--chart-3: oklch(0.872 0.071 142.745);
--chart-4: oklch(0.909 0.044 102.963);
--chart-5: oklch(0.89 0.064 126.08);
}