Tough is a shadcn/ui theme built around a deep green primary color (#3e5a11) with deep violet accents (#2d115a). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#3e5a11) on a green-tinted background (#090c03).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #090c03black |
| Foreground | #030401black | #f8faf4whitesmoke |
| Card | #fcfcfcsnow | #0c1004black |
| Card foreground | #000000black | #fafcf8snow |
| Popover | #fcfcfcsnow | #0c1004black |
| Popover foreground | #000000black | #fafcf8snow |
| Primary | #3e5a11darkolivegreen | #3e5a11darkolivegreen |
| Primary foreground | #d6efaepalegoldenrod | #d6efaepalegoldenrod |
| Secondary | #2d115amidnightblue | #2d115amidnightblue |
| Secondary foreground | #c7aeefplum | #c7aeefplum |
| Muted | #e2dee8gainsboro | #1b1721black |
| Muted foreground | #625e68dimgray | #9a97a1darkgray |
| Accent | #2d115amidnightblue | #2d115amidnightblue |
| Accent foreground | #c7aeefplum | #c7aeefplum |
| Destructive | #d51807firebrick | #f83b2aorangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3e5a11darkolivegreen | #3e5a11darkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.55:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 6.28:1 | AA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 4.77:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 5.31:1 | AA |
| Text on background | 18.74:1 | AAA |
| Text on card | 18.64:1 | AAA |
| Primary button | 6.28:1 | AA |
| Secondary button | 8.00:1 | AAA |
| Muted text | 6.13:1 | AA |
| Accent | 8.00:1 | AAA |
| Destructive | 3.70:1 | AA Large |
Paste this into your globals.css to use Tough in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.104 0.019 122.876);
--muted: oklch(0.907 0.013 303.421);
--muted-foreground: oklch(0.491 0.016 303.148);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.43 0.103 128.762);
--primary-foreground: oklch(0.919 0.09 125.162);
--secondary: oklch(0.271 0.12 294.341);
--secondary-foreground: oklch(0.794 0.095 301.832);
--accent: oklch(0.271 0.12 294.341);
--accent-foreground: oklch(0.794 0.095 301.832);
--destructive: oklch(0.555 0.218 30.058);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.43 0.103 128.762);
--chart-1: oklch(0.43 0.103 128.762);
--chart-2: oklch(0.271 0.12 294.341);
--chart-3: oklch(0.271 0.12 294.341);
--chart-4: oklch(0.295 0.134 293.97);
--chart-5: oklch(0.434 0.106 128.979);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.147 0.022 123.311);
--foreground: oklch(0.983 0.008 123.767);
--muted: oklch(0.215 0.019 302.305);
--muted-foreground: oklch(0.681 0.015 303.313);
--popover: oklch(0.164 0.026 124.731);
--popover-foreground: oklch(0.989 0.006 123.724);
--card: oklch(0.164 0.026 124.731);
--card-foreground: oklch(0.989 0.006 123.724);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.43 0.103 128.762);
--primary-foreground: oklch(0.919 0.09 125.162);
--secondary: oklch(0.271 0.12 294.341);
--secondary-foreground: oklch(0.794 0.095 301.832);
--accent: oklch(0.271 0.12 294.341);
--accent-foreground: oklch(0.794 0.095 301.832);
--destructive: oklch(0.643 0.227 29.788);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.43 0.103 128.762);
--chart-1: oklch(0.43 0.103 128.762);
--chart-2: oklch(0.271 0.12 294.341);
--chart-3: oklch(0.271 0.12 294.341);
--chart-4: oklch(0.295 0.134 293.97);
--chart-5: oklch(0.434 0.106 128.979);
}