Black and blue is a shadcn/ui theme built around a vivid blue primary color (#126eda) with vivid blue accents (#126eda). The light mode uses a neutral background (#000000). Dark mode keeps the vivid blue primary (#126eda) on an indigo-tinted background (#09090b).
| Token | Light | Dark |
|---|---|---|
| Background | #000000black | #09090bblack |
| Foreground | #ffffffwhite | #ffffffwhite |
| Card | #37373bdarkslategray | #37373bdarkslategray |
| Card foreground | #fdfdfdwhite | #ffffffwhite |
| Popover | #37373bdarkslategray | #37373bdarkslategray |
| Popover foreground | #9d8d9fdarkgray | #ffffffwhite |
| Primary | #126edaroyalblue | #126edaroyalblue |
| Primary foreground | #fdfdfdwhite | #eeeeeewhitesmoke |
| Secondary | #37373bdarkslategray | #3f3f46darkslategray |
| Secondary foreground | #fdfdfdwhite | #ffffffwhite |
| Muted | #126edaroyalblue | #37373bdarkslategray |
| Muted foreground | #fdfdfdwhite | #ffffffwhite |
| Accent | #126edaroyalblue | #126edaroyalblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #126edaroyalblue | #cd0700red |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #37373bdarkslategray | #37373bdarkslategray |
| Input | #fbfbfbsnow | #37373bdarkslategray |
| Ring | #692470rebeccapurple | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 11.65:1 | AAA |
| Primary button | 4.83:1 | AA |
| Secondary button | 11.65:1 | AAA |
| Muted text | 4.83:1 | AA |
| Accent | 4.92:1 | AA |
| Destructive | 4.92:1 | AA |
| Text on background | 19.89:1 | AAA |
| Text on card | 11.85:1 | AAA |
| Primary button | 4.24:1 | AA Large |
| Secondary button | 10.44:1 | AAA |
| Muted text | 11.85:1 | AAA |
| Accent | 4.92:1 | AA |
| Destructive | 5.79:1 | AA |
Paste this into your globals.css to use Black and blue in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.552 0.184 256.702);
--muted-foreground: oklch(0.994 0 180);
--popover: oklch(0.338 0.007 286.023);
--popover-foreground: oklch(0.663 0.033 323.357);
--card: oklch(0.338 0.007 286.023);
--card-foreground: oklch(0.994 0 180);
--border: oklch(0.338 0.007 286.023);
--input: oklch(0.988 0 171.87);
--primary: oklch(0.552 0.184 256.702);
--primary-foreground: oklch(0.994 0 180);
--secondary: oklch(0.338 0.007 286.023);
--secondary-foreground: oklch(0.994 0 180);
--accent: oklch(0.552 0.184 256.702);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.552 0.184 256.702);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.397 0.139 324.308);
--chart-1: oklch(0.552 0.184 256.702);
--chart-2: oklch(0.338 0.007 286.023);
--chart-3: oklch(0.552 0.184 256.702);
--chart-4: oklch(0.367 0.008 286.014);
--chart-5: oklch(0.553 0.189 257.02);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.141 0.004 285.823);
--foreground: oklch(1 0 180);
--muted: oklch(0.338 0.007 286.023);
--muted-foreground: oklch(1 0 180);
--popover: oklch(0.338 0.007 286.023);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.338 0.007 286.023);
--card-foreground: oklch(1 0 180);
--border: oklch(0.338 0.007 286.023);
--input: oklch(0.338 0.007 286.023);
--primary: oklch(0.552 0.184 256.702);
--primary-foreground: oklch(0.95 0 180);
--secondary: oklch(0.37 0.012 285.806);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.552 0.184 256.702);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.534 0.217 29.575);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(1 0 180);
--chart-1: oklch(0.552 0.184 256.702);
--chart-2: oklch(0.37 0.012 285.806);
--chart-3: oklch(0.552 0.184 256.702);
--chart-4: oklch(0.398 0.013 285.794);
--chart-5: oklch(0.553 0.189 257.02);
}