Charming is a shadcn/ui theme built around a muted green primary color (#5c7a5d) with muted red accents (#7a5d5c). The light mode uses a neutral background (#fbfefb). Dark mode keeps the muted green primary (#5c7a5d) on a neutral background (#020402).
| Token | Light | Dark |
|---|---|---|
| Background | #fbfefbwhite | #020402black |
| Foreground | #010401black | #f9fbf9mintcream |
| Card | #f7fdf7mintcream | #030703black |
| Card foreground | #000000black | #fcfdfcwhite |
| Popover | #f7fdf7mintcream | #030703black |
| Popover foreground | #000000black | #fcfdfcwhite |
| Primary | #5c7a5ddimgray | #5c7a5ddimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #5d5c7adimgray | #5d5c7adimgray |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dcdceflavender | #101023black |
| Muted foreground | #3c3c44darkslategray | #bcbbc3silver |
| Accent | #7a5d5cdimgray | #7a5d5cdimgray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #b72306firebrick | #f95939tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5c7a5ddimgray | #5c7a5ddimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.27:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 4.76:1 | AA |
| Secondary button | 6.39:1 | AA |
| Muted text | 8.07:1 | AAA |
| Accent | 5.91:1 | AA |
| Destructive | 6.44:1 | AA |
| Text on background | 19.83:1 | AAA |
| Text on card | 19.87:1 | AAA |
| Primary button | 4.76:1 | AA |
| Secondary button | 6.39:1 | AA |
| Muted text | 9.84:1 | AAA |
| Accent | 5.91:1 | AA |
| Destructive | 6.51:1 | AA |
Paste this into your globals.css to use Charming in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.994 0.005 146.498);
--foreground: oklch(0.097 0.018 145.048);
--muted: oklch(0.9 0.026 287.39);
--muted-foreground: oklch(0.359 0.013 287.251);
--popover: oklch(0.988 0.01 146.455);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.988 0.01 146.455);
--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.548 0.056 145.594);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.488 0.048 286.011);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.508 0.038 20.776);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.505 0.186 32.251);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.548 0.056 145.594);
--chart-1: oklch(0.548 0.056 145.594);
--chart-2: oklch(0.488 0.048 286.011);
--chart-3: oklch(0.508 0.038 20.776);
--chart-4: oklch(0.512 0.051 285.994);
--chart-5: oklch(0.553 0.068 145.397);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.095 0.013 145.465);
--foreground: oklch(0.986 0.004 146.504);
--muted: oklch(0.185 0.039 283.399);
--muted-foreground: oklch(0.796 0.011 287.69);
--popover: oklch(0.12 0.017 145.465);
--popover-foreground: oklch(0.993 0.002 146.523);
--card: oklch(0.12 0.017 145.465);
--card-foreground: oklch(0.993 0.002 146.523);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.548 0.056 145.594);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.488 0.048 286.011);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.508 0.038 20.776);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.674 0.201 33.211);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.548 0.056 145.594);
--chart-1: oklch(0.548 0.056 145.594);
--chart-2: oklch(0.488 0.048 286.011);
--chart-3: oklch(0.508 0.038 20.776);
--chart-4: oklch(0.512 0.051 285.994);
--chart-5: oklch(0.553 0.068 145.397);
}