Attractive for shadcn/ui

Attractive is a shadcn/ui theme built around a neutral gray primary color (#474946) with muted light green accents (#d2dbc7). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#474946) on a green-tinted background (#080a05).

Color palette

TokenLightDark
Background
#ffffffwhite
#080a05black
Foreground
#0b1203black
#fdfdfcwhite
Card
#fcfcfcsnow
#0a0d07black
Card foreground
#080d02black
#ffffffwhite
Popover
#ffffffwhite
#080a05black
Popover foreground
#0b1203black
#fdfdfcwhite
Primary
#474946darkslategray
#474946darkslategray
Primary foreground
#e0e1e0gainsboro
#e0e1e0gainsboro
Secondary
#e3e6e0gainsboro
#1f221bblack
Secondary foreground
#4b5341darkslategray
#b8bfb0silver
Muted
#edf0ealinen
#12150fblack
Muted foreground
#434b3adarkslategray
#bdc5b4silver
Accent
#d2dbc7lightgrey
#39422fdarkslategray
Accent foreground
#39442cdarkslategray
#d2d9c9lightgrey
Destructive
#8f0200darkred
#ff0905red
Destructive foreground
#ffc3c2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#474946darkslategray
#474946darkslategray

Contrast

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

Light mode
Text on background19.05:1AAA
Text on card19.22:1AAA
Primary button6.93:1AA
Secondary button6.39:1AA
Muted text7.92:1AAA
Accent7.19:1AAA
Destructive6.36:1AA
Dark mode
Text on background19.54:1AAA
Text on card19.52:1AAA
Primary button6.93:1AA
Secondary button8.53:1AAA
Muted text10.37:1AAA
Accent7.31:1AAA
Destructive3.96:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.169 0.035 127.791);
  --muted: oklch(0.952 0.008 127.216);
  --muted-foreground: oklch(0.4 0.03 128.067);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.169 0.035 127.791);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.15 0.03 126.346);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.403 0.005 127.265);
  --primary-foreground: oklch(0.909 0.002 127.135);
  --secondary: oklch(0.922 0.01 127.24);
  --secondary-foreground: oklch(0.429 0.03 128.011);
  --accent: oklch(0.878 0.028 127.504);
  --accent-foreground: oklch(0.369 0.041 128.587);
  --destructive: oklch(0.409 0.166 29.498);
  --destructive-foreground: oklch(0.87 0.069 19.697);
  --ring: oklch(0.403 0.005 127.265);
  --chart-1: oklch(0.403 0.005 127.265);
  --chart-2: oklch(0.922 0.01 127.24);
  --chart-3: oklch(0.878 0.028 127.504);
  --chart-4: oklch(0.943 0.007 127.202);
  --chart-5: oklch(0.407 0.012 127.492);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.012 126.54);
  --foreground: oklch(0.994 0.002 127.143);
  --muted: oklch(0.189 0.012 127.913);
  --muted-foreground: oklch(0.813 0.025 127.498);
  --popover: oklch(0.14 0.012 126.54);
  --popover-foreground: oklch(0.994 0.002 127.143);
  --card: oklch(0.155 0.014 127.49);
  --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.403 0.005 127.265);
  --primary-foreground: oklch(0.909 0.002 127.135);
  --secondary: oklch(0.246 0.013 127.789);
  --secondary-foreground: oklch(0.796 0.023 127.473);
  --accent: oklch(0.364 0.034 128.314);
  --accent-foreground: oklch(0.875 0.023 127.43);
  --destructive: oklch(0.63 0.256 29.234);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.403 0.005 127.265);
  --chart-1: oklch(0.403 0.005 127.265);
  --chart-2: oklch(0.246 0.013 127.789);
  --chart-3: oklch(0.364 0.034 128.314);
  --chart-4: oklch(0.28 0.016 127.834);
  --chart-5: oklch(0.407 0.012 127.492);
}