Generate feedback colors (success, warning, error, and info) for shadcn/ui
Go to generatorUsed by 4k+ developers. Want me to build your product next? Let's work together.
Communist Dark as Night is a shadcn/ui theme built around a neutral gray primary color (#475052) with neutral gray accents (#524947). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#475052) on a neutral background (#020303).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020303black |
| Foreground | #061114black | #ffffffwhite |
| Card | #fcfcfcsnow | #040607black |
| Card foreground | #050e10black | #ffffffwhite |
| Popover | #fcfcfcsnow | #040607black |
| Popover foreground | #050e10black | #ffffffwhite |
| Primary | #475052darkslategray | #475052darkslategray |
| Primary foreground | #e4e7e7gainsboro | #e4e7e7gainsboro |
| Secondary | #524947darkslategray | #524947darkslategray |
| Secondary foreground | #e7e4e4gainsboro | #e7e4e4gainsboro |
| Muted | #f4edeblinen | #140c0bblack |
| Muted foreground | #50423fdarkslategray | #c0b2afsilver |
| Accent | #524947darkslategray | #524947darkslategray |
| Accent foreground | #e7e4e4gainsboro | #e7e4e4gainsboro |
| Destructive | #832d01saddlebrown | #fd6a21tomato |
| Destructive foreground | #fed0b8peachpuff | #000000black |
| Border | #e2e8e9lavender | #1d2425black |
| Input | #e2e8e9lavender | #1d2425black |
| Ring | #475052darkslategray | #475052darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.12:1 | AAA |
| Text on card | 19.08:1 | AAA |
| Primary button | 6.64:1 | AA |
| Secondary button | 6.92:1 | AA |
| Muted text | 8.27:1 | AAA |
| Accent | 6.92:1 | AA |
| Destructive | 6.37:1 | AA |
| Text on background | 20.64:1 | AAA |
| Text on card | 20.30:1 | AAA |
| Primary button | 6.64:1 | AA |
| Secondary button | 6.92:1 | AA |
| Muted text | 9.39:1 | AAA |
| Accent | 6.92:1 | AA |
| Destructive | 7.25:1 | AAA |
Paste this into your globals.css to use Communist Dark as Night in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.169 0.018 211.067);
--muted: oklch(0.951 0.008 31.059);
--muted-foreground: oklch(0.392 0.02 31.235);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.154 0.016 210.047);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.154 0.016 210.047);
--border: oklch(0.926 0.006 211.039);
--input: oklch(0.926 0.006 211.039);
--primary: oklch(0.424 0.012 211.056);
--primary-foreground: oklch(0.925 0.003 211.041);
--secondary: oklch(0.413 0.012 31.127);
--secondary-foreground: oklch(0.922 0.003 31.05);
--accent: oklch(0.413 0.012 31.127);
--accent-foreground: oklch(0.922 0.003 31.05);
--destructive: oklch(0.42 0.128 41);
--destructive-foreground: oklch(0.891 0.062 48.009);
--ring: oklch(0.424 0.012 211.056);
--chart-1: oklch(0.424 0.012 211.056);
--chart-2: oklch(0.413 0.012 31.127);
--chart-3: oklch(0.413 0.012 31.127);
--chart-4: oklch(0.441 0.013 31.129);
--chart-5: oklch(0.427 0.017 211.09);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.094 0.006 208.876);
--foreground: oklch(1 0 180);
--muted: oklch(0.166 0.013 31.4);
--muted-foreground: oklch(0.774 0.017 31.096);
--popover: oklch(0.119 0.007 208.876);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.119 0.007 208.876);
--card-foreground: oklch(1 0 180);
--border: oklch(0.253 0.01 211.09);
--input: oklch(0.253 0.01 211.09);
--primary: oklch(0.424 0.012 211.056);
--primary-foreground: oklch(0.925 0.003 211.041);
--secondary: oklch(0.413 0.012 31.127);
--secondary-foreground: oklch(0.922 0.003 31.05);
--accent: oklch(0.413 0.012 31.127);
--accent-foreground: oklch(0.922 0.003 31.05);
--destructive: oklch(0.699 0.195 42.578);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.424 0.012 211.056);
--chart-1: oklch(0.424 0.012 211.056);
--chart-2: oklch(0.413 0.012 31.127);
--chart-3: oklch(0.413 0.012 31.127);
--chart-4: oklch(0.441 0.013 31.129);
--chart-5: oklch(0.427 0.017 211.09);
}