Size is a shadcn/ui theme built around a neutral gray primary color (#545959) with neutral gray accents (#545659). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#545959) on a neutral background (#030707).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030707black |
| Foreground | #031417black | #fcfdfdwhite |
| Card | #fcfcfcsnow | #040a0bblack |
| Card foreground | #021012black | #ffffffwhite |
| Popover | #ffffffwhite | #030707black |
| Popover foreground | #031417black | #fcfdfdwhite |
| Primary | #545959dimgray | #545959dimgray |
| Primary foreground | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Secondary | #545957dimgray | #545957dimgray |
| Secondary foreground | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Muted | #e9f1eewhitesmoke | #0e1613black |
| Muted foreground | #4e5553darkslategray | #aab1aedarkgray |
| Accent | #545659dimgray | #545659dimgray |
| Accent foreground | #eff0f0whitesmoke | #eff0f0whitesmoke |
| Destructive | #b84314firebrick | #e86430chocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #545959dimgray | #545959dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.81:1 | AAA |
| Text on card | 18.93:1 | AAA |
| Primary button | 6.26:1 | AA |
| Secondary button | 6.22:1 | AA |
| Muted text | 6.66:1 | AA |
| Accent | 6.44:1 | AA |
| Destructive | 5.47:1 | AA |
| Text on background | 19.89:1 | AAA |
| Text on card | 19.93:1 | AAA |
| Primary button | 6.26:1 | AA |
| Secondary button | 6.22:1 | AA |
| Muted text | 8.41:1 | AAA |
| Accent | 6.44:1 | AA |
| Destructive | 6.31:1 | AA |
Paste this into your globals.css to use Size in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.176 0.026 209.278);
--muted: oklch(0.952 0.01 173.281);
--muted-foreground: oklch(0.442 0.009 172.964);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.176 0.026 209.278);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.16 0.023 208.176);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.459 0.006 209.44);
--primary-foreground: oklch(0.955 0.001 209.466);
--secondary: oklch(0.46 0.007 173.112);
--secondary-foreground: oklch(0.955 0.001 173.541);
--accent: oklch(0.452 0.006 263.027);
--accent-foreground: oklch(0.954 0.001 263.052);
--destructive: oklch(0.538 0.161 39.064);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.459 0.006 209.44);
--chart-1: oklch(0.459 0.006 209.44);
--chart-2: oklch(0.46 0.007 173.112);
--chart-3: oklch(0.452 0.006 263.027);
--chart-4: oklch(0.488 0.008 173.106);
--chart-5: oklch(0.462 0.011 209.429);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.12 0.01 206.836);
--foreground: oklch(0.993 0.001 209.466);
--muted: oklch(0.191 0.014 171.289);
--muted-foreground: oklch(0.753 0.008 173.262);
--popover: oklch(0.12 0.01 206.836);
--popover-foreground: oklch(0.993 0.001 209.466);
--card: oklch(0.138 0.011 207.032);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.459 0.006 209.44);
--primary-foreground: oklch(0.955 0.001 209.466);
--secondary: oklch(0.46 0.007 173.112);
--secondary-foreground: oklch(0.955 0.001 173.541);
--accent: oklch(0.452 0.006 263.027);
--accent-foreground: oklch(0.954 0.001 263.052);
--destructive: oklch(0.661 0.176 40.43);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.459 0.006 209.44);
--chart-1: oklch(0.459 0.006 209.44);
--chart-2: oklch(0.46 0.007 173.112);
--chart-3: oklch(0.452 0.006 263.027);
--chart-4: oklch(0.488 0.008 173.106);
--chart-5: oklch(0.462 0.011 209.429);
}