Selfish is a shadcn/ui theme built around a muted green primary color (#5d8971) with neutral gray accents (#dee3e0). The light mode uses a neutral background (#f8fcfa). Dark mode keeps the muted green primary (#5d8971) on a green-tinted background (#060e0a).
| Token | Light | Dark |
|---|---|---|
| Background | #f8fcfamintcream | #060e0ablack |
| Foreground | #021209black | #fcfdfcwhite |
| Card | #f8fcfamintcream | #060e0ablack |
| Card foreground | #021209black | #fcfdfcwhite |
| Popover | #f8fcfamintcream | #060e0ablack |
| Popover foreground | #021209black | #fcfdfcwhite |
| Primary | #5d8971dimgray | #5d8971dimgray |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #dee3e0gainsboro | #1a1e1cblack |
| Secondary foreground | #424c47darkslategray | #b0bab5silver |
| Muted | #e2eee7lavender | #111d16black |
| Muted foreground | #4d5b53darkslategray | #a4b2aadarkgray |
| Accent | #dee3e0gainsboro | #1a1e1cblack |
| Accent foreground | #424c47darkslategray | #b0bab5silver |
| Destructive | #cb4b06chocolate | #f8722atomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5d8971dimgray | #5d8971dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.57:1 | AAA |
| Text on card | 18.57:1 | AAA |
| Primary button | 3.99:1 | AA Large |
| Secondary button | 6.84:1 | AA |
| Muted text | 6.01:1 | AA |
| Accent | 6.84:1 | AA |
| Destructive | 4.62:1 | AA |
| Text on background | 19.13:1 | AAA |
| Text on card | 19.13:1 | AAA |
| Primary button | 3.99:1 | AA Large |
| Secondary button | 8.45:1 | AAA |
| Muted text | 7.84:1 | AAA |
| Accent | 8.45:1 | AAA |
| Destructive | 7.46:1 | AAA |
Paste this into your globals.css to use Selfish in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.987 0.006 162.471);
--foreground: oklch(0.164 0.031 160.049);
--muted: oklch(0.939 0.017 162.177);
--muted-foreground: oklch(0.457 0.021 161.457);
--popover: oklch(0.987 0.006 162.471);
--popover-foreground: oklch(0.164 0.031 160.049);
--card: oklch(0.987 0.006 162.471);
--card-foreground: oklch(0.164 0.031 160.049);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.59 0.061 159.745);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.91 0.006 162.467);
--secondary-foreground: oklch(0.407 0.016 161.628);
--accent: oklch(0.91 0.006 162.467);
--accent-foreground: oklch(0.407 0.016 161.628);
--destructive: oklch(0.58 0.175 41.295);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.59 0.061 159.745);
--chart-1: oklch(0.59 0.061 159.745);
--chart-2: oklch(0.91 0.006 162.467);
--chart-3: oklch(0.91 0.006 162.467);
--chart-4: oklch(0.933 0.004 162.508);
--chart-5: oklch(0.596 0.069 159.292);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.154 0.016 161.268);
--foreground: oklch(0.993 0.002 162.563);
--muted: oklch(0.218 0.023 159.669);
--muted-foreground: oklch(0.75 0.018 162.002);
--popover: oklch(0.154 0.016 161.268);
--popover-foreground: oklch(0.993 0.002 162.563);
--card: oklch(0.154 0.016 161.268);
--card-foreground: oklch(0.993 0.002 162.563);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.59 0.061 159.745);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.23 0.007 161.829);
--secondary-foreground: oklch(0.78 0.014 162.17);
--accent: oklch(0.23 0.007 161.829);
--accent-foreground: oklch(0.78 0.014 162.17);
--destructive: oklch(0.704 0.183 44.858);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.59 0.061 159.745);
--chart-1: oklch(0.59 0.061 159.745);
--chart-2: oklch(0.23 0.007 161.829);
--chart-3: oklch(0.23 0.007 161.829);
--chart-4: oklch(0.263 0.009 161.768);
--chart-5: oklch(0.596 0.069 159.292);
}