Github Purple is a shadcn/ui theme built around a muted light blue primary color (#e2e5e9) with muted deep blue accents (#283548). The light mode uses a blue-tinted background (#0d1117). Dark mode keeps the muted light blue primary (#e2e5e9) on a blue-tinted background (#0d1117).
| Token | Light | Dark |
|---|---|---|
| Background | #0d1117black | #0d1117black |
| Foreground | #e2e5e9gainsboro | #e2e5e9gainsboro |
| Card | #090c10black | #090c10black |
| Card foreground | #f1f2f4whitesmoke | #f1f2f4whitesmoke |
| Popover | #070a0dblack | #070a0dblack |
| Popover foreground | #ffffffwhite | #ffffffwhite |
| Primary | #e2e5e9gainsboro | #e2e5e9gainsboro |
| Primary foreground | #434b56darkslategray | #434b56darkslategray |
| Secondary | #3e3f42darkslategray | #3e3f42darkslategray |
| Secondary foreground | #d8d9dagainsboro | #d8d9dagainsboro |
| Muted | #22252bdarkslategray | #22252bdarkslategray |
| Muted foreground | #9ba4b0darkgray | #9ba4b0darkgray |
| Accent | #283548darkslategray | #283548darkslategray |
| Accent foreground | #c4cfdelightgrey | #c4cfdelightgrey |
| Destructive | #d71714crimson | #d71714crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #191d24black | #191d24black |
| Input | #1f252ddarkslategray | #1f252ddarkslategray |
| Ring | #e2e5e9gainsboro | #e2e5e9gainsboro |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 14.99:1 | AAA |
| Text on card | 17.48:1 | AAA |
| Primary button | 6.98:1 | AA |
| Secondary button | 7.41:1 | AAA |
| Muted text | 6.07:1 | AA |
| Accent | 7.87:1 | AAA |
| Destructive | 5.23:1 | AA |
| Text on background | 14.99:1 | AAA |
| Text on card | 17.48:1 | AAA |
| Primary button | 6.98:1 | AA |
| Secondary button | 7.41:1 | AAA |
| Muted text | 6.07:1 | AA |
| Accent | 7.87:1 | AAA |
| Destructive | 5.23:1 | AA |
Paste this into your globals.css to use Github Purple in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.176 0.014 258.357);
--foreground: oklch(0.921 0.006 254.989);
--muted: oklch(0.264 0.012 258.372);
--muted-foreground: oklch(0.715 0.021 258.365);
--popover: oklch(0.142 0.009 256.104);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.153 0.01 258.219);
--card-foreground: oklch(0.961 0.003 254.97);
--border: oklch(0.231 0.014 258.369);
--input: oklch(0.262 0.017 258.367);
--primary: oklch(0.921 0.006 254.989);
--primary-foreground: oklch(0.41 0.022 255.179);
--secondary: oklch(0.369 0.004 255.015);
--secondary-foreground: oklch(0.884 0.002 254.967);
--accent: oklch(0.326 0.038 258.319);
--accent-foreground: oklch(0.85 0.024 258.364);
--destructive: oklch(0.559 0.219 28.693);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.921 0.006 254.989);
--chart-1: oklch(0.921 0.006 254.989);
--chart-2: oklch(0.369 0.004 255.015);
--chart-3: oklch(0.326 0.038 258.319);
--chart-4: oklch(0.397 0.005 255.017);
--chart-5: oklch(0.92 0.007 254.997);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.176 0.014 258.357);
--foreground: oklch(0.921 0.006 254.989);
--muted: oklch(0.264 0.012 258.372);
--muted-foreground: oklch(0.715 0.021 258.365);
--popover: oklch(0.142 0.009 256.104);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.153 0.01 258.219);
--card-foreground: oklch(0.961 0.003 254.97);
--border: oklch(0.231 0.014 258.369);
--input: oklch(0.262 0.017 258.367);
--primary: oklch(0.921 0.006 254.989);
--primary-foreground: oklch(0.41 0.022 255.179);
--secondary: oklch(0.369 0.004 255.015);
--secondary-foreground: oklch(0.884 0.002 254.967);
--accent: oklch(0.326 0.038 258.319);
--accent-foreground: oklch(0.85 0.024 258.364);
--destructive: oklch(0.559 0.219 28.693);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.921 0.006 254.989);
--chart-1: oklch(0.921 0.006 254.989);
--chart-2: oklch(0.369 0.004 255.015);
--chart-3: oklch(0.326 0.038 258.319);
--chart-4: oklch(0.397 0.005 255.017);
--chart-5: oklch(0.92 0.007 254.997);
}