Difficulty is a shadcn/ui theme built around a muted deep indigo primary color (#17161d) with muted deep green accents (#1c1d16). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the muted deep indigo primary (#17161d) on an indigo-tinted background (#07060e).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f8fcghostwhite | #07060eblack |
| Foreground | #03020dblack | #fcfcfdwhite |
| Card | #f5f5fawhitesmoke | #090812black |
| Card foreground | #020109black | #ffffffwhite |
| Popover | #f9f8fcghostwhite | #07060eblack |
| Popover foreground | #03020dblack | #fcfcfdwhite |
| Primary | #17161dblack | #17161dblack |
| Primary foreground | #aba8bddarkgray | #aba8bddarkgray |
| Secondary | #1c1d16black | #1c1d16black |
| Secondary foreground | #babda8silver | #babda8silver |
| Muted | #dddfd3gainsboro | #2b2c20darkslategray |
| Muted foreground | #464937darkslategray | #c6c8b6silver |
| Accent | #1c1d16black | #1c1d16black |
| Accent foreground | #babda8silver | #babda8silver |
| Destructive | #943510saddlebrown | #e9612bchocolate |
| Destructive foreground | #fbe3damistyrose | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #17161dblack | #17161dblack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.49:1 | AAA |
| Text on card | 19.08:1 | AAA |
| Primary button | 7.76:1 | AAA |
| Secondary button | 8.83:1 | AAA |
| Muted text | 6.85:1 | AA |
| Accent | 8.83:1 | AAA |
| Destructive | 6.17:1 | AA |
| Text on background | 19.64:1 | AAA |
| Text on card | 19.92:1 | AAA |
| Primary button | 7.76:1 | AAA |
| Secondary button | 8.83:1 | AAA |
| Muted text | 8.28:1 | AAA |
| Accent | 8.83:1 | AAA |
| Destructive | 6.18:1 | AA |
Paste this into your globals.css to use Difficulty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.005 292.45);
--foreground: oklch(0.101 0.035 288.642);
--muted: oklch(0.899 0.017 112.887);
--muted-foreground: oklch(0.396 0.029 113.901);
--popover: oklch(0.981 0.005 292.45);
--popover-foreground: oklch(0.101 0.035 288.642);
--card: oklch(0.971 0.007 292.401);
--card-foreground: oklch(0.088 0.03 288.996);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.204 0.014 291.207);
--primary-foreground: oklch(0.74 0.031 291.753);
--secondary: oklch(0.227 0.013 113.638);
--secondary-foreground: oklch(0.791 0.03 113.243);
--accent: oklch(0.227 0.013 113.638);
--accent-foreground: oklch(0.791 0.03 113.243);
--destructive: oklch(0.46 0.136 39.235);
--destructive-foreground: oklch(0.934 0.029 42.879);
--ring: oklch(0.204 0.014 291.207);
--chart-1: oklch(0.204 0.014 291.207);
--chart-2: oklch(0.227 0.013 113.638);
--chart-3: oklch(0.227 0.013 113.638);
--chart-4: oklch(0.263 0.017 113.726);
--chart-5: oklch(0.202 0.017 290.882);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.13 0.019 290.775);
--foreground: oklch(0.991 0.002 292.505);
--muted: oklch(0.289 0.021 113.925);
--muted-foreground: oklch(0.827 0.025 113.097);
--popover: oklch(0.13 0.019 290.775);
--popover-foreground: oklch(0.991 0.002 292.505);
--card: oklch(0.141 0.022 289.942);
--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.204 0.014 291.207);
--primary-foreground: oklch(0.74 0.031 291.753);
--secondary: oklch(0.227 0.013 113.638);
--secondary-foreground: oklch(0.791 0.03 113.243);
--accent: oklch(0.227 0.013 113.638);
--accent-foreground: oklch(0.791 0.03 113.243);
--destructive: oklch(0.656 0.181 40.076);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.204 0.014 291.207);
--chart-1: oklch(0.204 0.014 291.207);
--chart-2: oklch(0.227 0.013 113.638);
--chart-3: oklch(0.227 0.013 113.638);
--chart-4: oklch(0.263 0.017 113.726);
--chart-5: oklch(0.202 0.017 290.882);
}