Size is a shadcn/ui theme built around a near-white primary color (#f9fcf8) with near-white accents (#fcf8f9). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the near-white primary (#f9fcf8) on a neutral background (#020401).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fdf7mintcream | #020401black |
| Foreground | #071505black | #f9fcf8mintcream |
| Card | #f4fcf3honeydew | #030802black |
| Card foreground | #061004black | #fcfdfcwhite |
| Popover | #f4fcf3honeydew | #030802black |
| Popover foreground | #061004black | #fcfdfcwhite |
| Primary | #f9fcf8mintcream | #f9fcf8mintcream |
| Primary foreground | #223f1ddarkslategray | #223f1ddarkslategray |
| Secondary | #f8f9fcghostwhite | #f8f9fcghostwhite |
| Secondary foreground | #3d4885darkslateblue | #3d4885darkslateblue |
| Muted | #e8e8eelavender | #111217black |
| Muted foreground | #5a5b5edimgray | #a1a2a5darkgray |
| Accent | #fcf8f9snow | #fcf8f9snow |
| Accent foreground | #853d48sienna | #853d48sienna |
| Destructive | #af2512firebrick | #eb513dtomato |
| Destructive foreground | #fef7f6snow | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f9fcf8mintcream | #f9fcf8mintcream |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.21:1 | AAA |
| Text on card | 18.51:1 | AAA |
| Primary button | 11.27:1 | AAA |
| Secondary button | 8.07:1 | AAA |
| Muted text | 5.57:1 | AA |
| Accent | 7.22:1 | AAA |
| Destructive | 6.39:1 | AA |
| Text on background | 19.91:1 | AAA |
| Text on card | 19.80:1 | AAA |
| Primary button | 11.27:1 | AAA |
| Secondary button | 8.07:1 | AAA |
| Muted text | 7.31:1 | AAA |
| Accent | 7.22:1 | AAA |
| Destructive | 3.63:1 | AA Large |
Paste this into your globals.css to use Size in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.988 0.01 141.044);
--foreground: oklch(0.176 0.037 139.883);
--muted: oklch(0.933 0.007 278.208);
--muted-foreground: oklch(0.47 0.005 278.162);
--popover: oklch(0.983 0.015 141.033);
--popover-foreground: oklch(0.159 0.033 139.537);
--card: oklch(0.983 0.015 141.033);
--card-foreground: oklch(0.159 0.033 139.537);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.987 0.006 141.052);
--primary-foreground: oklch(0.335 0.067 140.729);
--secondary: oklch(0.981 0.004 278.255);
--secondary-foreground: oklch(0.423 0.102 273.742);
--accent: oklch(0.982 0.004 6.7);
--accent-foreground: oklch(0.457 0.099 12.459);
--destructive: oklch(0.493 0.177 31.039);
--destructive-foreground: oklch(0.981 0.008 26.495);
--ring: oklch(0.987 0.006 141.052);
--chart-1: oklch(0.987 0.006 141.052);
--chart-2: oklch(0.981 0.004 278.255);
--chart-3: oklch(0.982 0.004 6.7);
--chart-4: oklch(1.009 0.002 98.347);
--chart-5: oklch(0.987 0.006 141.051);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.098 0.018 139.302);
--foreground: oklch(0.987 0.006 141.052);
--muted: oklch(0.185 0.011 277.41);
--muted-foreground: oklch(0.712 0.005 278.226);
--popover: oklch(0.123 0.023 139.302);
--popover-foreground: oklch(0.993 0.003 141.059);
--card: oklch(0.123 0.023 139.302);
--card-foreground: oklch(0.993 0.003 141.059);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.987 0.006 141.052);
--primary-foreground: oklch(0.335 0.067 140.729);
--secondary: oklch(0.981 0.004 278.255);
--secondary-foreground: oklch(0.423 0.102 273.742);
--accent: oklch(0.982 0.004 6.7);
--accent-foreground: oklch(0.457 0.099 12.459);
--destructive: oklch(0.643 0.193 30.532);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.987 0.006 141.052);
--chart-1: oklch(0.987 0.006 141.052);
--chart-2: oklch(0.981 0.004 278.255);
--chart-3: oklch(0.982 0.004 6.7);
--chart-4: oklch(1.009 0.002 98.347);
--chart-5: oklch(0.987 0.006 141.051);
}