Battleship is a shadcn/ui theme built around a muted violet primary color (#4d3e70) with muted purple accents (#663e70). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted violet primary (#4d3e70) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020203black |
| Foreground | #000000black | #fcfbfdsnow |
| Card | #ffffffwhite | #020203black |
| Card foreground | #000000black | #fcfbfdsnow |
| Popover | #ffffffwhite | #020203black |
| Popover foreground | #000000black | #fcfbfdsnow |
| Primary | #4d3e70darkslateblue | #4d3e70darkslateblue |
| Primary foreground | #eeebf4lavender | #eeebf4lavender |
| Secondary | #3e4870darkslateblue | #3e4870darkslateblue |
| Secondary foreground | #ebedf4lavender | #ebedf4lavender |
| Muted | #dfe2eclavender | #131620black |
| Muted foreground | #373a49darkslategray | #b6bac8silver |
| Accent | #663e70darkslateblue | #663e70darkslateblue |
| Accent foreground | #f2ebf4whitesmoke | #f2ebf4whitesmoke |
| Destructive | #dc1709red | #f63528orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4d3e70darkslateblue | #4d3e70darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 8.01:1 | AAA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 8.70:1 | AAA |
| Accent | 7.25:1 | AAA |
| Destructive | 5.02:1 | AA |
| Text on background | 20.11:1 | AAA |
| Text on card | 20.11:1 | AAA |
| Primary button | 8.01:1 | AAA |
| Secondary button | 7.63:1 | AAA |
| Muted text | 9.33:1 | AAA |
| Accent | 7.25:1 | AAA |
| Destructive | 3.84:1 | AA Large |
Paste this into your globals.css to use Battleship in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.913 0.014 274.85);
--muted-foreground: oklch(0.352 0.025 274.034);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.402 0.084 296.246);
--primary-foreground: oklch(0.945 0.012 299.822);
--secondary: oklch(0.41 0.069 272.37);
--secondary-foreground: oklch(0.947 0.01 274.908);
--accent: oklch(0.43 0.093 319.406);
--accent-foreground: oklch(0.949 0.014 319.448);
--destructive: oklch(0.569 0.225 29.757);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.402 0.084 296.246);
--chart-1: oklch(0.402 0.084 296.246);
--chart-2: oklch(0.41 0.069 272.37);
--chart-3: oklch(0.43 0.093 319.406);
--chart-4: oklch(0.434 0.074 272.33);
--chart-5: oklch(0.397 0.092 295.744);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.009 300.143);
--foreground: oklch(0.99 0.003 299.991);
--muted: oklch(0.202 0.02 273.591);
--muted-foreground: oklch(0.79 0.021 274.703);
--popover: oklch(0.085 0.009 300.143);
--popover-foreground: oklch(0.99 0.003 299.991);
--card: oklch(0.085 0.009 300.143);
--card-foreground: oklch(0.99 0.003 299.991);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.402 0.084 296.246);
--primary-foreground: oklch(0.945 0.012 299.822);
--secondary: oklch(0.41 0.069 272.37);
--secondary-foreground: oklch(0.947 0.01 274.908);
--accent: oklch(0.43 0.093 319.406);
--accent-foreground: oklch(0.949 0.014 319.448);
--destructive: oklch(0.634 0.229 29.319);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.402 0.084 296.246);
--chart-1: oklch(0.402 0.084 296.246);
--chart-2: oklch(0.41 0.069 272.37);
--chart-3: oklch(0.43 0.093 319.406);
--chart-4: oklch(0.434 0.074 272.33);
--chart-5: oklch(0.397 0.092 295.744);
}