Bookcase is a shadcn/ui theme built around a purple primary color (#9f64af) with muted light purple accents (#c9bdcc). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the purple primary (#9f64af) on a purple-tinted background (#0a040c).
| Token | Light | Dark |
|---|---|---|
| Background | #fbf8fcghostwhite | #0a040cblack |
| Foreground | #0b020dblack | #ffffffwhite |
| Card | #fbf8fcghostwhite | #0a040cblack |
| Card foreground | #0b020dblack | #ffffffwhite |
| Popover | #fbf8fcghostwhite | #0a040cblack |
| Popover foreground | #0b020dblack | #ffffffwhite |
| Primary | #9f64afmediumpurple | #9f64afmediumpurple |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #d8d3d9lightgrey | #2f2631darkslategray |
| Secondary foreground | #403842darkslategray | #c9bdccsilver |
| Muted | #ede0f1lavender | #1c0e1fblack |
| Muted foreground | #635e64dimgray | #a09ba1darkgray |
| Accent | #c9bdccsilver | #4d3653darkslategray |
| Accent foreground | #2f2631darkslategray | #e2d7e5gainsboro |
| Destructive | #bc1c10firebrick | #ef4f43tomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #9f64afmediumpurple | #9f64afmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.33:1 | AAA |
| Text on card | 19.33:1 | AAA |
| Primary button | 4.26:1 | AA Large |
| Secondary button | 7.64:1 | AAA |
| Muted text | 4.96:1 | AA |
| Accent | 8.04:1 | AAA |
| Destructive | 6.36:1 | AA |
| Text on background | 20.31:1 | AAA |
| Text on card | 20.31:1 | AAA |
| Primary button | 4.26:1 | AA Large |
| Secondary button | 8.09:1 | AAA |
| Muted text | 6.78:1 | AA |
| Accent | 7.63:1 | AAA |
| Destructive | 3.58:1 | AA Large |
Paste this into your globals.css to use Bookcase in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.007 318.888);
--foreground: oklch(0.118 0.036 320.804);
--muted: oklch(0.921 0.027 318.88);
--muted-foreground: oklch(0.488 0.011 318.883);
--popover: oklch(0.982 0.007 318.888);
--popover-foreground: oklch(0.118 0.036 320.804);
--card: oklch(0.982 0.007 318.888);
--card-foreground: oklch(0.118 0.036 320.804);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.596 0.128 318.721);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.873 0.01 318.886);
--secondary-foreground: oklch(0.354 0.02 318.87);
--accent: oklch(0.812 0.025 318.88);
--accent-foreground: oklch(0.282 0.024 318.857);
--destructive: oklch(0.51 0.194 29.667);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.596 0.128 318.721);
--chart-1: oklch(0.596 0.128 318.721);
--chart-2: oklch(0.873 0.01 318.886);
--chart-3: oklch(0.812 0.025 318.88);
--chart-4: oklch(0.897 0.008 318.887);
--chart-5: oklch(0.594 0.139 318.682);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.025 320.418);
--foreground: oklch(1 0 180);
--muted: oklch(0.193 0.038 318.747);
--muted-foreground: oklch(0.696 0.01 318.886);
--popover: oklch(0.122 0.025 320.418);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.122 0.025 320.418);
--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.596 0.128 318.721);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.282 0.024 318.857);
--secondary-foreground: oklch(0.812 0.025 318.88);
--accent: oklch(0.372 0.056 318.808);
--accent-foreground: oklch(0.892 0.022 318.882);
--destructive: oklch(0.647 0.198 28.009);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.596 0.128 318.721);
--chart-1: oklch(0.596 0.128 318.721);
--chart-2: oklch(0.282 0.024 318.857);
--chart-3: oklch(0.372 0.056 318.808);
--chart-4: oklch(0.311 0.027 318.855);
--chart-5: oklch(0.594 0.139 318.682);
}