Only is a shadcn/ui theme built around a muted light purple primary color (#f1eaf0) with muted light pink accents (#f1eaec). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light purple primary (#f1eaf0) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #160413black | #faf5f9whitesmoke |
| Card | #ffffffwhite | #000000black |
| Card foreground | #160413black | #faf5f9whitesmoke |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #160413black | #faf5f9whitesmoke |
| Primary | #f1eaf0whitesmoke | #f1eaf0whitesmoke |
| Primary foreground | #654360dimgray | #654360dimgray |
| Secondary | #eeeaf1lavender | #eeeaf1lavender |
| Secondary foreground | #594365dimgray | #594365dimgray |
| Muted | #dfdae2gainsboro | #221d25black |
| Muted foreground | #5a4b63dimgray | #ac9cb4darkgray |
| Accent | #f1eaeclinen | #f1eaeclinen |
| Accent foreground | #654350dimgray | #654350dimgray |
| Destructive | #a73e01saddlebrown | #f95c01orangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f1eaf0whitesmoke | #f1eaf0whitesmoke |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 7.01:1 | AAA |
| Secondary button | 7.29:1 | AAA |
| Muted text | 5.81:1 | AA |
| Accent | 7.14:1 | AAA |
| Destructive | 6.28:1 | AA |
| Text on background | 19.49:1 | AAA |
| Text on card | 19.49:1 | AAA |
| Primary button | 7.01:1 | AAA |
| Secondary button | 7.29:1 | AAA |
| Muted text | 6.41:1 | AA |
| Accent | 7.14:1 | AAA |
| Destructive | 6.54:1 | AA |
Paste this into your globals.css to use Only in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.15 0.046 332.617);
--muted: oklch(0.894 0.012 313.523);
--muted-foreground: oklch(0.436 0.044 312.989);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.15 0.046 332.617);
--card: oklch(1 0 180);
--card-foreground: oklch(0.15 0.046 332.617);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.943 0.011 329.829);
--primary-foreground: oklch(0.433 0.064 331.371);
--secondary: oklch(0.941 0.011 313.536);
--secondary-foreground: oklch(0.42 0.061 312.702);
--accent: oklch(0.942 0.008 352.831);
--accent-foreground: oklch(0.426 0.05 355.737);
--destructive: oklch(0.505 0.151 42.339);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.943 0.011 329.829);
--chart-1: oklch(0.943 0.011 329.829);
--chart-2: oklch(0.941 0.011 313.536);
--chart-3: oklch(0.942 0.008 352.831);
--chart-4: oklch(0.967 0.006 313.567);
--chart-5: oklch(0.943 0.013 329.851);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.975 0.008 329.786);
--muted: oklch(0.241 0.017 313.182);
--muted-foreground: oklch(0.714 0.039 313.273);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.975 0.008 329.786);
--card: oklch(0 0 0);
--card-foreground: oklch(0.975 0.008 329.786);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.943 0.011 329.829);
--primary-foreground: oklch(0.433 0.064 331.371);
--secondary: oklch(0.941 0.011 313.536);
--secondary-foreground: oklch(0.42 0.061 312.702);
--accent: oklch(0.942 0.008 352.831);
--accent-foreground: oklch(0.426 0.05 355.737);
--destructive: oklch(0.674 0.206 41.216);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.943 0.011 329.829);
--chart-1: oklch(0.943 0.011 329.829);
--chart-2: oklch(0.941 0.011 313.536);
--chart-3: oklch(0.942 0.008 352.831);
--chart-4: oklch(0.967 0.006 313.567);
--chart-5: oklch(0.943 0.013 329.851);
}