Unselfish is a shadcn/ui theme built around a deep violet primary color (#542f65) with muted light violet accents (#ded3e3). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep violet primary (#542f65) on a violet-tinted background (#09040b).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #09040bblack |
| Foreground | #100416black | #ffffffwhite |
| Card | #ffffffwhite | #09040bblack |
| Card foreground | #100416black | #ffffffwhite |
| Popover | #ffffffwhite | #09040bblack |
| Popover foreground | #100416black | #ffffffwhite |
| Primary | #542f65darkslateblue | #542f65darkslateblue |
| Primary foreground | #e7d9edlavender | #e7d9edlavender |
| Secondary | #e9e5eblavender | #343135darkslategray |
| Secondary foreground | #534559darkslategray | #cdcacelightgrey |
| Muted | #f0e6f4lavender | #140b19black |
| Muted foreground | #63536adimgray | #a595acdarkgray |
| Accent | #ded3e3gainsboro | #4a414edarkslategray |
| Accent foreground | #483451darkslategray | #e1dee3gainsboro |
| Destructive | #8f0c0adarkred | #ea1410red |
| Destructive foreground | #fcd0cfpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #542f65darkslateblue | #542f65darkslateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.98:1 | AAA |
| Text on card | 19.98:1 | AAA |
| Primary button | 7.88:1 | AAA |
| Secondary button | 7.14:1 | AAA |
| Muted text | 5.82:1 | AA |
| Accent | 7.73:1 | AAA |
| Destructive | 6.76:1 | AA |
| Text on background | 20.32:1 | AAA |
| Text on card | 20.32:1 | AAA |
| Primary button | 7.88:1 | AAA |
| Secondary button | 7.88:1 | AAA |
| Muted text | 6.86:1 | AA |
| Accent | 7.31:1 | AAA |
| Destructive | 4.57:1 | AA |
Paste this into your globals.css to use Unselfish in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.141 0.046 315.07);
--muted: oklch(0.937 0.021 315.332);
--muted-foreground: oklch(0.466 0.041 315.059);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.141 0.046 315.07);
--card: oklch(1 0 180);
--card-foreground: oklch(0.141 0.046 315.07);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.376 0.097 314.157);
--primary-foreground: oklch(0.902 0.031 315.283);
--secondary: oklch(0.927 0.009 315.386);
--secondary-foreground: oklch(0.412 0.038 315.037);
--accent: oklch(0.881 0.024 315.312);
--accent-foreground: oklch(0.359 0.055 314.752);
--destructive: oklch(0.414 0.162 28.651);
--destructive-foreground: oklch(0.895 0.049 19.258);
--ring: oklch(0.376 0.097 314.157);
--chart-1: oklch(0.376 0.097 314.157);
--chart-2: oklch(0.927 0.009 315.386);
--chart-3: oklch(0.881 0.024 315.312);
--chart-4: oklch(0.951 0.006 315.401);
--chart-5: oklch(0.375 0.104 314.01);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.024 316.942);
--foreground: oklch(1 0 180);
--muted: oklch(0.17 0.032 314.589);
--muted-foreground: oklch(0.692 0.037 315.203);
--popover: oklch(0.121 0.024 316.942);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.121 0.024 316.942);
--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.376 0.097 314.157);
--primary-foreground: oklch(0.902 0.031 315.283);
--secondary: oklch(0.318 0.006 315.347);
--secondary-foreground: oklch(0.843 0.005 315.404);
--accent: oklch(0.389 0.024 315.166);
--accent-foreground: oklch(0.904 0.008 315.388);
--destructive: oklch(0.593 0.236 28.927);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.376 0.097 314.157);
--chart-1: oklch(0.376 0.097 314.157);
--chart-2: oklch(0.318 0.006 315.347);
--chart-3: oklch(0.389 0.024 315.166);
--chart-4: oklch(0.348 0.007 315.345);
--chart-5: oklch(0.375 0.104 314.01);
}