Unselfish for shadcn/ui

Unselfish is a shadcn/ui theme built around a deep blue primary color (#222844) with deep green accents (#284422). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the deep blue primary (#222844) on a blue-tinted background (#04060b).

Color palette

TokenLightDark
Background
#fbfcfewhite
#04060bblack
Foreground
#030512black
#f5f6f9whitesmoke
Card
#fbfcfewhite
#04060bblack
Card foreground
#030512black
#f5f6f9whitesmoke
Popover
#fbfcfewhite
#04060bblack
Popover foreground
#030512black
#f5f6f9whitesmoke
Primary
#222844darkslategray
#222844darkslategray
Primary foreground
#bbc1ddlightsteelblue
#bbc1ddlightsteelblue
Secondary
#442228darkslategray
#442228darkslategray
Secondary foreground
#ddbbc1thistle
#ddbbc1thistle
Muted
#e3dedfgainsboro
#211c1dblack
Muted foreground
#66575adimgray
#a8999cdarkgray
Accent
#284422darkslategray
#284422darkslategray
Accent foreground
#c1ddbbsilver
#c1ddbbsilver
Destructive
#ad1010firebrick
#eb2424crimson
Destructive foreground
#fef1f1lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#222844darkslategray
#222844darkslategray

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button8.10:1AAA
Secondary button7.94:1AAA
Muted text5.11:1AA
Accent7.35:1AAA
Destructive6.68:1AA
Dark mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button8.10:1AAA
Secondary button7.94:1AAA
Muted text6.17:1AA
Accent7.35:1AAA
Destructive4.38:1AA Large

CSS variables

Paste this into your globals.css to use Unselfish in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 276.125);
  --foreground: oklch(0.122 0.031 266.565);
  --muted: oklch(0.904 0.006 4.492);
  --muted-foreground: oklch(0.472 0.02 5.43);
  --popover: oklch(0.99 0.003 276.125);
  --popover-foreground: oklch(0.122 0.031 266.565);
  --card: oklch(0.99 0.003 276.125);
  --card-foreground: oklch(0.122 0.031 266.565);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.286 0.053 273.044);
  --primary-foreground: oklch(0.815 0.04 275.464);
  --secondary: oklch(0.3 0.053 9.11);
  --secondary-foreground: oklch(0.823 0.041 5.595);
  --accent: oklch(0.355 0.067 139.944);
  --accent-foreground: oklch(0.868 0.056 139.937);
  --destructive: oklch(0.475 0.186 28.279);
  --destructive-foreground: oklch(0.968 0.014 17.394);
  --ring: oklch(0.286 0.053 273.044);
  --chart-1: oklch(0.286 0.053 273.044);
  --chart-2: oklch(0.3 0.053 9.11);
  --chart-3: oklch(0.355 0.067 139.944);
  --chart-4: oklch(0.328 0.06 9.273);
  --chart-5: oklch(0.283 0.057 272.672);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.015 271.24);
  --foreground: oklch(0.974 0.005 276.105);
  --muted: oklch(0.233 0.009 5.298);
  --muted-foreground: oklch(0.697 0.018 4.996);
  --popover: oklch(0.12 0.015 271.24);
  --popover-foreground: oklch(0.974 0.005 276.105);
  --card: oklch(0.12 0.015 271.24);
  --card-foreground: oklch(0.974 0.005 276.105);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.286 0.053 273.044);
  --primary-foreground: oklch(0.815 0.04 275.464);
  --secondary: oklch(0.3 0.053 9.11);
  --secondary-foreground: oklch(0.823 0.041 5.595);
  --accent: oklch(0.355 0.067 139.944);
  --accent-foreground: oklch(0.868 0.056 139.937);
  --destructive: oklch(0.602 0.229 27.705);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.286 0.053 273.044);
  --chart-1: oklch(0.286 0.053 273.044);
  --chart-2: oklch(0.3 0.053 9.11);
  --chart-3: oklch(0.355 0.067 139.944);
  --chart-4: oklch(0.328 0.06 9.273);
  --chart-5: oklch(0.283 0.057 272.672);
}