GitHub Sharp Dark is a shadcn/ui theme built around a near-white primary color (#ffffff) with neutral gray accents (#474d4d). The light mode uses a neutral background (#222525). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#222525).
| Token | Light | Dark |
|---|---|---|
| Background | #222525darkslategray | #222525darkslategray |
| Foreground | #c4c7casilver | #c4c7casilver |
| Card | #1d2020black | #1d2020black |
| Card foreground | #d1d4d6lightgrey | #d1d4d6lightgrey |
| Popover | #1b1d1dblack | #1b1d1dblack |
| Popover foreground | #dfe0e2gainsboro | #dfe0e2gainsboro |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #404040darkslategray | #404040darkslategray |
| Secondary foreground | #d9d9d9gainsboro | #d9d9d9gainsboro |
| Muted | #283333darkslategray | #283333darkslategray |
| Muted foreground | #a4b7b7darkgray | #a4b7b7darkgray |
| Accent | #474d4ddarkslategray | #474d4ddarkslategray |
| Accent foreground | #e2e4e4gainsboro | #e2e4e4gainsboro |
| Destructive | #d11815firebrick | #d11815firebrick |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #303030darkslategray | #303030darkslategray |
| Input | #383838darkslategray | #383838darkslategray |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 9.08:1 | AAA |
| Text on card | 11.02:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.19:1 | AA |
| Accent | 6.75:1 | AA |
| Destructive | 5.46:1 | AA |
| Text on background | 9.08:1 | AAA |
| Text on card | 11.02:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 7.37:1 | AAA |
| Muted text | 6.19:1 | AA |
| Accent | 6.75:1 | AA |
| Destructive | 5.46:1 | AA |
Paste this into your globals.css to use GitHub Sharp Dark in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.262 0.004 196.902);
--foreground: oklch(0.828 0.005 247.885);
--muted: oklch(0.313 0.015 196.415);
--muted-foreground: oklch(0.765 0.022 196.709);
--popover: oklch(0.229 0.003 196.92);
--popover-foreground: oklch(0.907 0.003 247.852);
--card: oklch(0.24 0.004 196.913);
--card-foreground: oklch(0.868 0.004 247.868);
--border: oklch(0.311 0 180);
--input: oklch(0.341 0 158.199);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.415 0.008 196.861);
--accent-foreground: oklch(0.917 0.002 197.115);
--destructive: oklch(0.548 0.214 28.62);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.415 0.008 196.861);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.262 0.004 196.902);
--foreground: oklch(0.828 0.005 247.885);
--muted: oklch(0.313 0.015 196.415);
--muted-foreground: oklch(0.765 0.022 196.709);
--popover: oklch(0.229 0.003 196.92);
--popover-foreground: oklch(0.907 0.003 247.852);
--card: oklch(0.24 0.004 196.913);
--card-foreground: oklch(0.868 0.004 247.868);
--border: oklch(0.311 0 180);
--input: oklch(0.341 0 158.199);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(0.371 0 168.69);
--secondary-foreground: oklch(0.885 0 180);
--accent: oklch(0.415 0.008 196.861);
--accent-foreground: oklch(0.917 0.002 197.115);
--destructive: oklch(0.548 0.214 28.62);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.371 0 168.69);
--chart-3: oklch(0.415 0.008 196.861);
--chart-4: oklch(0.399 0 180);
--chart-5: oklch(1 0 180);
}