Only is a shadcn/ui theme built around an indigo primary color (#3239b8) with violet accents (#6f32b8). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the indigo primary (#3239b8) on an indigo-tinted background (#05060a).
| Token | Light | Dark |
|---|---|---|
| Background | #f7f7fdghostwhite | #05060ablack |
| Foreground | #000000black | #f8f8fbghostwhite |
| Card | #f3f4fbwhitesmoke | #07070dblack |
| Card foreground | #000000black | #fcfcfdwhite |
| Popover | #f3f4fbwhitesmoke | #07070dblack |
| Popover foreground | #000000black | #fcfcfdwhite |
| Primary | #3239b8darkslateblue | #3239b8darkslateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #327cb8steelblue | #327cb8steelblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dadee2gainsboro | #1d2225black |
| Muted foreground | #5e5e5edimgray | #a1a1a1darkgray |
| Accent | #6f32b8rebeccapurple | #6f32b8rebeccapurple |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #ac3506firebrick | #f7652btomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3239b8darkslateblue | #3239b8darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.73:1 | AAA |
| Text on card | 19.12:1 | AAA |
| Primary button | 8.68:1 | AAA |
| Secondary button | 4.45:1 | AA Large |
| Muted text | 4.80:1 | AA |
| Accent | 7.42:1 | AAA |
| Destructive | 6.40:1 | AA |
| Text on background | 19.13:1 | AAA |
| Text on card | 19.55:1 | AAA |
| Primary button | 8.68:1 | AAA |
| Secondary button | 4.45:1 | AA Large |
| Muted text | 6.23:1 | AA |
| Accent | 7.42:1 | AAA |
| Destructive | 6.86:1 | AA |
Paste this into your globals.css to use Only in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.979 0.007 283.85);
--foreground: oklch(0 0 0);
--muted: oklch(0.899 0.007 242.294);
--muted-foreground: oklch(0.483 0 180);
--popover: oklch(0.968 0.01 283.787);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.968 0.01 283.787);
--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.431 0.195 272.45);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.569 0.118 246.688);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.474 0.197 299.168);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.502 0.162 37.563);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.431 0.195 272.45);
--chart-1: oklch(0.431 0.195 272.45);
--chart-2: oklch(0.569 0.118 246.688);
--chart-3: oklch(0.474 0.197 299.168);
--chart-4: oklch(0.595 0.124 246.733);
--chart-5: oklch(0.427 0.204 271.616);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.122 0.012 281.675);
--foreground: oklch(0.981 0.004 283.901);
--muted: oklch(0.247 0.009 242.701);
--muted-foreground: oklch(0.708 0 158.199);
--popover: oklch(0.134 0.013 281.713);
--popover-foreground: oklch(0.991 0.002 283.937);
--card: oklch(0.134 0.013 281.713);
--card-foreground: oklch(0.991 0.002 283.937);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.431 0.195 272.45);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.569 0.118 246.688);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.474 0.197 299.168);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.685 0.192 39.91);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.431 0.195 272.45);
--chart-1: oklch(0.431 0.195 272.45);
--chart-2: oklch(0.569 0.118 246.688);
--chart-3: oklch(0.474 0.197 299.168);
--chart-4: oklch(0.595 0.124 246.733);
--chart-5: oklch(0.427 0.204 271.616);
}