Necessary is a shadcn/ui theme built around a muted deep pink primary color (#4e3c44) with muted deep red accents (#4e3d3c). The light mode uses a neutral background (#fcf7fa). Dark mode keeps the muted deep pink primary (#4e3c44) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf7fasnow | #000000black |
| Foreground | #17030cblack | #ffffffwhite |
| Card | #fcf7fasnow | #000000black |
| Card foreground | #17030cblack | #ffffffwhite |
| Popover | #fcf7fasnow | #000000black |
| Popover foreground | #17030cblack | #ffffffwhite |
| Primary | #4e3c44darkslategray | #4e3c44darkslategray |
| Primary foreground | #e2daddgainsboro | #e2daddgainsboro |
| Secondary | #4e3c4ddarkslategray | #4e3c4ddarkslategray |
| Secondary foreground | #e2dae2gainsboro | #e2dae2gainsboro |
| Muted | #e7cbe5gainsboro | #341833darkslategray |
| Muted foreground | #443b44darkslategray | #c4bbc3silver |
| Accent | #4e3d3cdarkslategray | #4e3d3cdarkslategray |
| Accent foreground | #e2dadagainsboro | #e2dadagainsboro |
| Destructive | #750606maroon | #ef0b0bred |
| Destructive foreground | #fbb1b1lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4e3c44darkslategray | #4e3c44darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.84:1 | AAA |
| Text on card | 18.84:1 | AAA |
| Primary button | 7.46:1 | AAA |
| Secondary button | 7.40:1 | AAA |
| Muted text | 7.19:1 | AAA |
| Accent | 7.44:1 | AAA |
| Destructive | 6.75:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.46:1 | AAA |
| Secondary button | 7.40:1 | AAA |
| Muted text | 8.46:1 | AAA |
| Accent | 7.44:1 | AAA |
| Destructive | 4.45:1 | AA Large |
Paste this into your globals.css to use Necessary in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.006 347.985);
--foreground: oklch(0.144 0.045 352.207);
--muted: oklch(0.873 0.046 327.517);
--muted-foreground: oklch(0.366 0.019 327.499);
--popover: oklch(0.982 0.006 347.985);
--popover-foreground: oklch(0.144 0.045 352.207);
--card: oklch(0.982 0.006 347.985);
--card-foreground: oklch(0.144 0.045 352.207);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.378 0.028 349.748);
--primary-foreground: oklch(0.895 0.011 348.139);
--secondary: oklch(0.382 0.037 327.893);
--secondary-foreground: oklch(0.896 0.014 327.186);
--accent: oklch(0.377 0.024 21.789);
--accent-foreground: oklch(0.895 0.009 21.018);
--destructive: oklch(0.356 0.141 28.501);
--destructive-foreground: oklch(0.831 0.087 19.081);
--ring: oklch(0.378 0.028 349.748);
--chart-1: oklch(0.378 0.028 349.748);
--chart-2: oklch(0.382 0.037 327.893);
--chart-3: oklch(0.377 0.024 21.789);
--chart-4: oklch(0.409 0.04 327.907);
--chart-5: oklch(0.376 0.035 350.198);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.262 0.061 328.972);
--muted-foreground: oklch(0.801 0.015 327.214);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.378 0.028 349.748);
--primary-foreground: oklch(0.895 0.011 348.139);
--secondary: oklch(0.382 0.037 327.893);
--secondary-foreground: oklch(0.896 0.014 327.186);
--accent: oklch(0.377 0.024 21.789);
--accent-foreground: oklch(0.895 0.009 21.018);
--destructive: oklch(0.6 0.243 28.914);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.378 0.028 349.748);
--chart-1: oklch(0.378 0.028 349.748);
--chart-2: oklch(0.382 0.037 327.893);
--chart-3: oklch(0.377 0.024 21.789);
--chart-4: oklch(0.409 0.04 327.907);
--chart-5: oklch(0.376 0.035 350.198);
}