Bitter is a shadcn/ui theme built around a neutral gray primary color (#707275) with neutral gray accents (#727570). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#707275) on a blue-tinted background (#03060c).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #03060cblack |
| Foreground | #030811black | #ffffffwhite |
| Card | #fcfcfcsnow | #050810black |
| Card foreground | #03060dblack | #ffffffwhite |
| Popover | #ffffffwhite | #03060cblack |
| Popover foreground | #030811black | #ffffffwhite |
| Primary | #707275dimgray | #707275dimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #757072dimgray | #757072dimgray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #ede8ealinen | #171213black |
| Muted foreground | #72555edimgray | #aa8d96rosybrown |
| Accent | #727570dimgray | #727570dimgray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #d04306chocolate | #f85e1borangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #707275dimgray | #707275dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.06:1 | AAA |
| Text on card | 19.83:1 | AAA |
| Primary button | 4.82:1 | AA |
| Secondary button | 4.84:1 | AA |
| Muted text | 5.45:1 | AA |
| Accent | 4.66:1 | AA |
| Destructive | 4.69:1 | AA |
| Text on background | 20.26:1 | AAA |
| Text on card | 20.02:1 | AAA |
| Primary button | 4.82:1 | AA |
| Secondary button | 4.84:1 | AA |
| Muted text | 6.15:1 | AA |
| Accent | 4.66:1 | AA |
| Destructive | 6.59:1 | AA |
Paste this into your globals.css to use Bitter in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.132 0.023 258.634);
--muted: oklch(0.935 0.007 355.82);
--muted-foreground: oklch(0.482 0.042 358.009);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.132 0.023 258.634);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.12 0.02 256.833);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.552 0.005 265.963);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.551 0.006 355.932);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.558 0.008 135.489);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.578 0.186 38.028);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.552 0.005 265.963);
--chart-1: oklch(0.552 0.005 265.963);
--chart-2: oklch(0.551 0.006 355.932);
--chart-3: oklch(0.558 0.008 135.489);
--chart-4: oklch(0.577 0.006 355.935);
--chart-5: oklch(0.547 0.013 265.885);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.016 258.566);
--foreground: oklch(1 0 180);
--muted: oklch(0.188 0.01 357.109);
--muted-foreground: oklch(0.672 0.038 357.201);
--popover: oklch(0.122 0.016 258.566);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.135 0.019 260.267);
--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.552 0.005 265.963);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.551 0.006 355.932);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.558 0.008 135.489);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.675 0.202 39.791);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.552 0.005 265.963);
--chart-1: oklch(0.552 0.005 265.963);
--chart-2: oklch(0.551 0.006 355.932);
--chart-3: oklch(0.558 0.008 135.489);
--chart-4: oklch(0.577 0.006 355.935);
--chart-5: oklch(0.547 0.013 265.885);
}