Opulent is a shadcn/ui theme built around a muted blue primary color (#788ca1) with muted indigo accents (#7878a1). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#788ca1) on a blue-tinted background (#04080c).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #04080cblack |
| Foreground | #010205black | #f9fafbghostwhite |
| Card | #ffffffwhite | #04080cblack |
| Card foreground | #010205black | #f9fafbghostwhite |
| Popover | #ffffffwhite | #04080cblack |
| Popover foreground | #010205black | #f9fafbghostwhite |
| Primary | #788ca1lightslategray | #788ca1lightslategray |
| Primary foreground | #000000black | #000000black |
| Secondary | #78a0a1cadetblue | #78a0a1cadetblue |
| Secondary foreground | #000000black | #000000black |
| Muted | #d7dbdbgainsboro | #242828darkslategray |
| Muted foreground | #3a4a4adarkslategray | #b5c4c5silver |
| Accent | #7878a1lightslategray | #7878a1lightslategray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #b74401saddlebrown | #fe640borangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #788ca1lightslategray | #788ca1lightslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.74:1 | AAA |
| Text on card | 20.74:1 | AAA |
| Primary button | 6.03:1 | AA |
| Secondary button | 7.35:1 | AAA |
| Muted text | 6.63:1 | AA |
| Accent | 4.21:1 | AA Large |
| Destructive | 5.49:1 | AA |
| Text on background | 19.27:1 | AAA |
| Text on card | 19.27:1 | AAA |
| Primary button | 6.03:1 | AA |
| Secondary button | 7.35:1 | AAA |
| Muted text | 8.26:1 | AAA |
| Accent | 4.21:1 | AA Large |
| Destructive | 7.04:1 | AAA |
Paste this into your globals.css to use Opulent in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.087 0.014 238.208);
--muted: oklch(0.887 0.004 198.293);
--muted-foreground: oklch(0.396 0.02 197.655);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.087 0.014 238.208);
--card: oklch(1 0 180);
--card-foreground: oklch(0.087 0.014 238.208);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.63 0.04 250.195);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.677 0.044 197.465);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.588 0.063 285.059);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.537 0.162 42.052);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.63 0.04 250.195);
--chart-1: oklch(0.63 0.04 250.195);
--chart-2: oklch(0.677 0.044 197.465);
--chart-3: oklch(0.588 0.063 285.059);
--chart-4: oklch(0.699 0.041 197.543);
--chart-5: oklch(0.629 0.046 250.285);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.128 0.014 242.536);
--foreground: oklch(0.984 0.002 249.67);
--muted: oklch(0.273 0.005 198.071);
--muted-foreground: oklch(0.81 0.017 198.051);
--popover: oklch(0.128 0.014 242.536);
--popover-foreground: oklch(0.984 0.002 249.67);
--card: oklch(0.128 0.014 242.536);
--card-foreground: oklch(0.984 0.002 249.67);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.63 0.04 250.195);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.677 0.044 197.465);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.588 0.063 285.059);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.692 0.204 42.522);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.63 0.04 250.195);
--chart-1: oklch(0.63 0.04 250.195);
--chart-2: oklch(0.677 0.044 197.465);
--chart-3: oklch(0.588 0.063 285.059);
--chart-4: oklch(0.699 0.041 197.543);
--chart-5: oklch(0.629 0.046 250.285);
}