Rocker is a shadcn/ui theme built around a vivid indigo primary color (#1a0bc1) with vivid green accents (#0bc11a). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the vivid indigo primary (#1a0bc1) on a neutral background (#030307).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfbfeghostwhite | #030307black |
| Foreground | #070514black | #f6f6f9whitesmoke |
| Card | #f7f7fdghostwhite | #05050bblack |
| Card foreground | #050410black | #f9f9fbghostwhite |
| Popover | #f7f7fdghostwhite | #05050bblack |
| Popover foreground | #050410black | #f9f9fbghostwhite |
| Primary | #1a0bc1mediumblue | #1a0bc1mediumblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #c11a0bfirebrick | #c11a0bfirebrick |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f1eae9linen | #160f0eblack |
| Muted foreground | #554a49darkslategray | #b6abaadarkgray |
| Accent | #0bc11alimegreen | #0bc11alimegreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #650b01maroon | #fe3f2aorangered |
| Destructive foreground | #fea49alightsalmon | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #1a0bc1mediumblue | #1a0bc1mediumblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.51:1 | AAA |
| Text on card | 19.04:1 | AAA |
| Primary button | 11.27:1 | AAA |
| Secondary button | 6.14:1 | AA |
| Muted text | 7.18:1 | AAA |
| Accent | 2.43:1 | Fail |
| Destructive | 6.84:1 | AA |
| Text on background | 19.07:1 | AAA |
| Text on card | 19.36:1 | AAA |
| Primary button | 11.27:1 | AAA |
| Secondary button | 6.14:1 | AA |
| Muted text | 8.49:1 | AAA |
| Accent | 2.43:1 | Fail |
| Destructive | 3.52:1 | AA Large |
Paste this into your globals.css to use Rocker in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.989 0.004 290.165);
--foreground: oklch(0.131 0.033 285.685);
--muted: oklch(0.942 0.007 23.659);
--muted-foreground: oklch(0.42 0.016 23.986);
--popover: oklch(0.977 0.009 290.08);
--popover-foreground: oklch(0.121 0.029 286.457);
--card: oklch(0.977 0.009 290.08);
--card-foreground: oklch(0.121 0.029 286.457);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.379 0.245 268.107);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.518 0.2 30.091);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.703 0.233 143.032);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.326 0.124 31.511);
--destructive-foreground: oklch(0.805 0.11 26.655);
--ring: oklch(0.379 0.245 268.107);
--chart-1: oklch(0.379 0.245 268.107);
--chart-2: oklch(0.518 0.2 30.091);
--chart-3: oklch(0.703 0.233 143.032);
--chart-4: oklch(0.547 0.211 30.088);
--chart-5: oklch(0.38 0.25 267.454);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.102 0.015 288.395);
--foreground: oklch(0.974 0.004 290.176);
--muted: oklch(0.176 0.012 24.364);
--muted-foreground: oklch(0.75 0.013 23.763);
--popover: oklch(0.117 0.017 288.383);
--popover-foreground: oklch(0.983 0.002 290.2);
--card: oklch(0.117 0.017 288.383);
--card-foreground: oklch(0.983 0.002 290.2);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.379 0.245 268.107);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.518 0.2 30.091);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.703 0.233 143.032);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.655 0.229 30.396);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.379 0.245 268.107);
--chart-1: oklch(0.379 0.245 268.107);
--chart-2: oklch(0.518 0.2 30.091);
--chart-3: oklch(0.703 0.233 143.032);
--chart-4: oklch(0.547 0.211 30.088);
--chart-5: oklch(0.38 0.25 267.454);
}