Crab is a shadcn/ui theme built around a blue primary color (#283677) with violet accents (#412877). The light mode uses a neutral background (#f6f8fd). Dark mode keeps the blue primary (#283677) on a blue-tinted background (#05060a).
| Token | Light | Dark |
|---|---|---|
| Background | #f6f8fdghostwhite | #05060ablack |
| Foreground | #000000black | #f9fafbghostwhite |
| Card | #f2f4fdaliceblue | #07080eblack |
| Card foreground | #000000black | #fcfcfdwhite |
| Popover | #f2f4fdaliceblue | #07080eblack |
| Popover foreground | #000000black | #fcfcfdwhite |
| Primary | #283677midnightblue | #283677midnightblue |
| Primary foreground | #dde1f4lavender | #dde1f4lavender |
| Secondary | #285e77darkslategray | #285e77darkslategray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dbdfe1gainsboro | #1e2224black |
| Muted foreground | #596064dimgray | #9ba3a6darkgray |
| Accent | #412877darkslateblue | #412877darkslateblue |
| Accent foreground | #e4ddf4lavender | #e4ddf4lavender |
| Destructive | #da0b0bred | #f20d0dred |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #283677midnightblue | #283677midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.74:1 | AAA |
| Text on card | 19.13:1 | AAA |
| Primary button | 8.58:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 4.76:1 | AA |
| Accent | 8.94:1 | AAA |
| Destructive | 5.20:1 | AA |
| Text on background | 19.37:1 | AAA |
| Text on card | 19.51:1 | AAA |
| Primary button | 8.58:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 6.23:1 | AA |
| Accent | 8.94:1 | AAA |
| Destructive | 4.33:1 | AA Large |
Paste this into your globals.css to use Crab in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.979 0.008 276.062);
--foreground: oklch(0 0 0);
--muted: oklch(0.901 0.005 226.926);
--muted-foreground: oklch(0.485 0.011 227.16);
--popover: oklch(0.968 0.012 276.006);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.968 0.012 276.006);
--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.359 0.112 270.356);
--primary-foreground: oklch(0.911 0.026 275.779);
--secondary: oklch(0.455 0.07 231.16);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.353 0.129 293.267);
--accent-foreground: oklch(0.909 0.032 300.189);
--destructive: oklch(0.561 0.226 28.835);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.359 0.112 270.356);
--chart-1: oklch(0.359 0.112 270.356);
--chart-2: oklch(0.455 0.07 231.16);
--chart-3: oklch(0.353 0.129 293.267);
--chart-4: oklch(0.486 0.075 231.248);
--chart-5: oklch(0.357 0.118 269.896);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.123 0.011 272.55);
--foreground: oklch(0.984 0.001 276.148);
--muted: oklch(0.25 0.007 227.23);
--muted-foreground: oklch(0.709 0.01 227.039);
--popover: oklch(0.136 0.013 273.109);
--popover-foreground: oklch(0.992 0.001 276.156);
--card: oklch(0.136 0.013 273.109);
--card-foreground: oklch(0.992 0.001 276.156);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.359 0.112 270.356);
--primary-foreground: oklch(0.911 0.026 275.779);
--secondary: oklch(0.455 0.07 231.16);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.353 0.129 293.267);
--accent-foreground: oklch(0.909 0.032 300.189);
--destructive: oklch(0.607 0.245 28.879);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.359 0.112 270.356);
--chart-1: oklch(0.359 0.112 270.356);
--chart-2: oklch(0.455 0.07 231.16);
--chart-3: oklch(0.353 0.129 293.267);
--chart-4: oklch(0.486 0.075 231.248);
--chart-5: oklch(0.357 0.118 269.896);
}