Writer is a shadcn/ui theme built around a neutral gray primary color (#b7b9be) with neutral gray accents (#b7b7be). The light mode uses a neutral background (#f7f9fd). Dark mode keeps the neutral gray primary (#b7b9be) on a blue-tinted background (#04070b).
| Token | Light | Dark |
|---|---|---|
| Background | #f7f9fdghostwhite | #04070bblack |
| Foreground | #020408black | #f9fafbghostwhite |
| Card | #f3f6fcaliceblue | #05090fblack |
| Card foreground | #010204black | #fcfcfdwhite |
| Popover | #f3f6fcaliceblue | #05090fblack |
| Popover foreground | #010204black | #fcfcfdwhite |
| Primary | #b7b9besilver | #b7b9besilver |
| Primary foreground | #1f2123black | #1f2123black |
| Secondary | #b7bdbesilver | #b7bdbesilver |
| Secondary foreground | #1f2223black | #1f2223black |
| Muted | #e8ededlavender | #121717black |
| Muted foreground | #485e61darkslategray | #9eb5b7darkgray |
| Accent | #b7b7besilver | #b7b7besilver |
| Accent foreground | #201f23black | #201f23black |
| Destructive | #be4f13chocolate | #eb7333tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b7b9besilver | #b7b9besilver |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.49:1 | AAA |
| Text on card | 19.21:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 5.81:1 | AA |
| Accent | 8.20:1 | AAA |
| Destructive | 4.86:1 | AA |
| Text on background | 19.31:1 | AAA |
| Text on card | 19.43:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 8.40:1 | AAA |
| Muted text | 8.42:1 | AAA |
| Accent | 8.20:1 | AAA |
| Destructive | 7.03:1 | AAA |
Paste this into your globals.css to use Writer in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.006 258.327);
--foreground: oklch(0.108 0.015 248.818);
--muted: oklch(0.942 0.005 204.948);
--muted-foreground: oklch(0.465 0.028 204.692);
--popover: oklch(0.973 0.008 258.334);
--popover-foreground: oklch(0.086 0.012 248.818);
--card: oklch(0.973 0.008 258.334);
--card-foreground: oklch(0.086 0.012 248.818);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.786 0.007 258.333);
--primary-foreground: oklch(0.246 0.004 258.35);
--secondary: oklch(0.793 0.007 204.924);
--secondary-foreground: oklch(0.251 0.004 204.863);
--accent: oklch(0.781 0.01 290.78);
--accent-foreground: oklch(0.243 0.006 290.525);
--destructive: oklch(0.565 0.158 43.436);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.786 0.007 258.333);
--chart-1: oklch(0.786 0.007 258.333);
--chart-2: oklch(0.793 0.007 204.924);
--chart-3: oklch(0.781 0.01 290.78);
--chart-4: oklch(0.817 0.006 204.933);
--chart-5: oklch(0.784 0.011 258.344);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.126 0.013 251.782);
--foreground: oklch(0.984 0.002 258.319);
--muted: oklch(0.198 0.007 204.757);
--muted-foreground: oklch(0.756 0.025 204.776);
--popover: oklch(0.139 0.015 254.108);
--popover-foreground: oklch(0.992 0.001 258.316);
--card: oklch(0.139 0.015 254.108);
--card-foreground: oklch(0.992 0.001 258.316);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.786 0.007 258.333);
--primary-foreground: oklch(0.246 0.004 258.35);
--secondary: oklch(0.793 0.007 204.924);
--secondary-foreground: oklch(0.251 0.004 204.863);
--accent: oklch(0.781 0.01 290.78);
--accent-foreground: oklch(0.243 0.006 290.525);
--destructive: oklch(0.687 0.166 45.855);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.786 0.007 258.333);
--chart-1: oklch(0.786 0.007 258.333);
--chart-2: oklch(0.793 0.007 204.924);
--chart-3: oklch(0.781 0.01 290.78);
--chart-4: oklch(0.817 0.006 204.933);
--chart-5: oklch(0.784 0.011 258.344);
}