Charming is a shadcn/ui theme built around a purple primary color (#a81f8f) with cyan accents (#1f8fa8). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#a81f8f) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #150512black | #fdfcfdwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #11040eblack | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #150512black | #fdfcfdwhite |
| Primary | #a81f8fmediumvioletred | #a81f8fmediumvioletred |
| Primary foreground | #fefbfewhite | #fefbfewhite |
| Secondary | #8fa81fyellowgreen | #8fa81fyellowgreen |
| Secondary foreground | #000000black | #000000black |
| Muted | #dadbd6gainsboro | #282924darkslategray |
| Muted foreground | #5e5f59dimgray | #a5a6a0darkgray |
| Accent | #1f8fa8lightseagreen | #1f8fa8lightseagreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #bf3008firebrick | #f7643btomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a81f8fmediumvioletred | #a81f8fmediumvioletred |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.76:1 | AAA |
| Text on card | 19.61:1 | AAA |
| Primary button | 6.27:1 | AA |
| Secondary button | 7.79:1 | AAA |
| Muted text | 4.64:1 | AA |
| Accent | 3.78:1 | AA Large |
| Destructive | 5.77:1 | AA |
| Text on background | 20.51:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 6.27:1 | AA |
| Secondary button | 7.79:1 | AAA |
| Muted text | 5.98:1 | AA |
| Accent | 3.78:1 | AA Large |
| Destructive | 6.82:1 | AA |
Paste this into your globals.css to use Charming in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.15 0.041 334.364);
--muted: oklch(0.89 0.007 114.975);
--muted-foreground: oklch(0.481 0.009 115.159);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.15 0.041 334.364);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.136 0.036 333.798);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.51 0.204 337.176);
--primary-foreground: oklch(0.991 0.005 331.483);
--secondary: oklch(0.689 0.155 120.215);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.602 0.1 217.403);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.53 0.185 34.19);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.51 0.204 337.176);
--chart-1: oklch(0.51 0.204 337.176);
--chart-2: oklch(0.689 0.155 120.215);
--chart-3: oklch(0.602 0.1 217.403);
--chart-4: oklch(0.728 0.164 120.252);
--chart-5: oklch(0.515 0.209 337.375);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.992 0.001 331.425);
--muted: oklch(0.278 0.01 115.468);
--muted-foreground: oklch(0.723 0.008 115.026);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.992 0.001 331.425);
--card: oklch(0.092 0 180);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.51 0.204 337.176);
--primary-foreground: oklch(0.991 0.005 331.483);
--secondary: oklch(0.689 0.155 120.215);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.602 0.1 217.403);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.684 0.189 36.149);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.51 0.204 337.176);
--chart-1: oklch(0.51 0.204 337.176);
--chart-2: oklch(0.689 0.155 120.215);
--chart-3: oklch(0.602 0.1 217.403);
--chart-4: oklch(0.728 0.164 120.252);
--chart-5: oklch(0.515 0.209 337.375);
}