Sum is a shadcn/ui theme built around a neutral gray primary color (#a4a398) with neutral gray accents (#989aa4). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#a4a398) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #090801black | #ffffffwhite |
| Card | #ffffffwhite | #000000black |
| Card foreground | #090801black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #090801black | #ffffffwhite |
| Primary | #a4a398darkgray | #a4a398darkgray |
| Primary foreground | #050505black | #050505black |
| Secondary | #989aa4darkgray | #989aa4darkgray |
| Secondary foreground | #050505black | #050505black |
| Muted | #d8dbeegainsboro | #111427black |
| Muted foreground | #4e4e50darkslategray | #afafb1darkgray |
| Accent | #989aa4darkgray | #989aa4darkgray |
| Accent foreground | #050505black | #050505black |
| Destructive | #73130cmaroon | #e72a1dcrimson |
| Destructive foreground | #f8bebalightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a4a398darkgray | #a4a398darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.06:1 | AAA |
| Text on card | 20.06:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 7.25:1 | AAA |
| Muted text | 6.02:1 | AA |
| Accent | 7.25:1 | AAA |
| Destructive | 7.12:1 | AAA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 7.25:1 | AAA |
| Muted text | 8.33:1 | AAA |
| Accent | 7.25:1 | AAA |
| Destructive | 4.41:1 | AA Large |
Paste this into your globals.css to use Sum in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.132 0.022 104.555);
--muted: oklch(0.894 0.027 279.851);
--muted-foreground: oklch(0.426 0.002 280.246);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.132 0.022 104.555);
--card: oklch(1 0 180);
--card-foreground: oklch(0.132 0.022 104.555);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.712 0.015 100.64);
--primary-foreground: oklch(0.117 0.002 100.771);
--secondary: oklch(0.687 0.015 279.981);
--secondary-foreground: oklch(0.114 0.002 279.861);
--accent: oklch(0.687 0.015 279.981);
--accent-foreground: oklch(0.114 0.002 279.861);
--destructive: oklch(0.362 0.131 29.353);
--destructive-foreground: oklch(0.852 0.067 23.262);
--ring: oklch(0.712 0.015 100.64);
--chart-1: oklch(0.712 0.015 100.64);
--chart-2: oklch(0.687 0.015 279.981);
--chart-3: oklch(0.687 0.015 279.981);
--chart-4: oklch(0.713 0.014 280.024);
--chart-5: oklch(0.719 0.022 100.78);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.198 0.039 276.541);
--muted-foreground: oklch(0.755 0.002 280.289);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.712 0.015 100.64);
--primary-foreground: oklch(0.117 0.002 100.771);
--secondary: oklch(0.687 0.015 279.981);
--secondary-foreground: oklch(0.114 0.002 279.861);
--accent: oklch(0.687 0.015 279.981);
--accent-foreground: oklch(0.114 0.002 279.861);
--destructive: oklch(0.599 0.224 29.545);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.712 0.015 100.64);
--chart-1: oklch(0.712 0.015 100.64);
--chart-2: oklch(0.687 0.015 279.981);
--chart-3: oklch(0.687 0.015 279.981);
--chart-4: oklch(0.713 0.014 280.024);
--chart-5: oklch(0.719 0.022 100.78);
}