Only is a shadcn/ui theme built around a violet primary color (#b99ce3) with green accents (#9ce3b9). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#b99ce3) on a violet-tinted background (#0a070e).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0a070eblack |
| Foreground | #07040cblack | #f7f5f9whitesmoke |
| Card | #ffffffwhite | #0a070eblack |
| Card foreground | #07040cblack | #f7f5f9whitesmoke |
| Popover | #ffffffwhite | #0a070eblack |
| Popover foreground | #07040cblack | #f7f5f9whitesmoke |
| Primary | #b99ce3plum | #b99ce3plum |
| Primary foreground | #23113cmidnightblue | #23113cmidnightblue |
| Secondary | #e3b99cburlywood | #e3b99cburlywood |
| Secondary foreground | #3c2311black | #3c2311black |
| Muted | #edeae8linen | #171412black |
| Muted foreground | #504c49darkslategray | #b6b2afdarkgray |
| Accent | #9ce3b9palegreen | #9ce3b9palegreen |
| Accent foreground | #113c23darkgreen | #113c23darkgreen |
| Destructive | #a0370dsaddlebrown | #ec5418chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #b99ce3plum | #b99ce3plum |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.35:1 | AAA |
| Text on card | 20.35:1 | AAA |
| Primary button | 7.31:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 7.10:1 | AAA |
| Accent | 8.31:1 | AAA |
| Destructive | 6.88:1 | AA |
| Text on background | 18.51:1 | AAA |
| Text on card | 18.51:1 | AAA |
| Primary button | 7.31:1 | AAA |
| Secondary button | 8.12:1 | AAA |
| Muted text | 8.71:1 | AAA |
| Accent | 8.31:1 | AAA |
| Destructive | 3.58:1 | AA Large |
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.117 0.023 305.92);
--muted: oklch(0.939 0.005 58.291);
--muted-foreground: oklch(0.419 0.006 58.152);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.117 0.023 305.92);
--card: oklch(1 0 180);
--card-foreground: oklch(0.117 0.023 305.92);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.744 0.105 303.041);
--primary-foreground: oklch(0.229 0.079 299.242);
--secondary: oklch(0.816 0.063 57.24);
--secondary-foreground: oklch(0.283 0.048 54.936);
--accent: oklch(0.857 0.092 158.144);
--accent-foreground: oklch(0.318 0.065 154.362);
--destructive: oklch(0.484 0.148 38.649);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.744 0.105 303.041);
--chart-1: oklch(0.744 0.105 303.041);
--chart-2: oklch(0.816 0.063 57.24);
--chart-3: oklch(0.857 0.092 158.144);
--chart-4: oklch(0.838 0.055 57.424);
--chart-5: oklch(0.741 0.111 302.918);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.135 0.018 304.673);
--foreground: oklch(0.973 0.006 304.96);
--muted: oklch(0.194 0.007 57.845);
--muted-foreground: oklch(0.766 0.005 58.263);
--popover: oklch(0.135 0.018 304.673);
--popover-foreground: oklch(0.973 0.006 304.96);
--card: oklch(0.135 0.018 304.673);
--card-foreground: oklch(0.973 0.006 304.96);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.744 0.105 303.041);
--primary-foreground: oklch(0.229 0.079 299.242);
--secondary: oklch(0.816 0.063 57.24);
--secondary-foreground: oklch(0.283 0.048 54.936);
--accent: oklch(0.857 0.092 158.144);
--accent-foreground: oklch(0.318 0.065 154.362);
--destructive: oklch(0.645 0.198 38.565);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.744 0.105 303.041);
--chart-1: oklch(0.744 0.105 303.041);
--chart-2: oklch(0.816 0.063 57.24);
--chart-3: oklch(0.857 0.092 158.144);
--chart-4: oklch(0.838 0.055 57.424);
--chart-5: oklch(0.741 0.111 302.918);
}