Sunlight is a shadcn/ui theme built around a muted light purple primary color (#f0e6ee) with muted light purple accents (#e9dde7). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light purple primary (#f0e6ee) on a neutral background (#070306).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #070306black |
| Foreground | #000000black | #fbf9fbsnow |
| Card | #ffffffwhite | #070306black |
| Card foreground | #000000black | #fbf9fbsnow |
| Popover | #ffffffwhite | #070306black |
| Popover foreground | #000000black | #fbf9fbsnow |
| Primary | #f0e6eelavender | #f0e6eelavender |
| Primary foreground | #663d60dimgray | #663d60dimgray |
| Secondary | #e9dde7gainsboro | #261c25black |
| Secondary foreground | #593b54darkslategray | #c5afc2silver |
| Muted | #f6eef5whitesmoke | #110910black |
| Muted foreground | #5b4d59dimgray | #b2a4b0darkgray |
| Accent | #e9dde7gainsboro | #261c25black |
| Accent foreground | #593b54darkslategray | #c5afc2silver |
| Destructive | #692302maroon | #fb6018orangered |
| Destructive foreground | #febda0lightpink | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f0e6eelavender | #f0e6eelavender |
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 | 7.16:1 | AAA |
| Secondary button | 7.33:1 | AAA |
| Muted text | 6.97:1 | AA |
| Accent | 7.33:1 | AAA |
| Destructive | 7.05:1 | AAA |
| Text on background | 19.54:1 | AAA |
| Text on card | 19.54:1 | AAA |
| Primary button | 7.16:1 | AAA |
| Secondary button | 8.06:1 | AAA |
| Muted text | 8.26:1 | AAA |
| Accent | 8.06:1 | AAA |
| Destructive | 6.80:1 | AA |
Paste this into your globals.css to use Sunlight in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.958 0.013 330.421);
--muted-foreground: oklch(0.439 0.025 330.97);
--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.934 0.016 330.465);
--primary-foreground: oklch(0.422 0.076 332.405);
--secondary: oklch(0.91 0.018 330.494);
--secondary-foreground: oklch(0.396 0.057 331.974);
--accent: oklch(0.91 0.018 330.494);
--accent-foreground: oklch(0.396 0.057 331.974);
--destructive: oklch(0.359 0.109 40.887);
--destructive-foreground: oklch(0.851 0.085 45.943);
--ring: oklch(0.934 0.016 330.465);
--chart-1: oklch(0.934 0.016 330.465);
--chart-2: oklch(0.91 0.018 330.494);
--chart-3: oklch(0.91 0.018 330.494);
--chart-4: oklch(0.935 0.013 330.421);
--chart-5: oklch(0.933 0.018 330.491);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.111 0.016 330.982);
--foreground: oklch(0.984 0.003 330.281);
--muted: oklch(0.153 0.021 331.836);
--muted-foreground: oklch(0.734 0.022 330.633);
--popover: oklch(0.111 0.016 330.982);
--popover-foreground: oklch(0.984 0.003 330.281);
--card: oklch(0.111 0.016 330.982);
--card-foreground: oklch(0.984 0.003 330.281);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.934 0.016 330.465);
--primary-foreground: oklch(0.422 0.076 332.405);
--secondary: oklch(0.242 0.023 331.421);
--secondary-foreground: oklch(0.779 0.036 330.829);
--accent: oklch(0.242 0.023 331.421);
--accent-foreground: oklch(0.779 0.036 330.829);
--destructive: oklch(0.684 0.204 40.511);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.934 0.016 330.465);
--chart-1: oklch(0.934 0.016 330.465);
--chart-2: oklch(0.242 0.023 331.421);
--chart-3: oklch(0.242 0.023 331.421);
--chart-4: oklch(0.273 0.028 331.488);
--chart-5: oklch(0.933 0.018 330.491);
}