Attractive for shadcn/ui

Attractive is a shadcn/ui theme built around a deep green primary color (#516f20) with deep violet accents (#3e206f). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#516f20) on a neutral background (#060703).

Color palette

TokenLightDark
Background
#ffffffwhite
#060703black
Foreground
#0f1504black
#ffffffwhite
Card
#ffffffwhite
#060703black
Card foreground
#0f1504black
#ffffffwhite
Popover
#ffffffwhite
#060703black
Popover foreground
#0f1504black
#ffffffwhite
Primary
#516f20darkolivegreen
#516f20darkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#3e206fmidnightblue
#3e206fmidnightblue
Secondary foreground
#dcd0f1gainsboro
#dcd0f1gainsboro
Muted
#e7e2eelavender
#16111dblack
Muted foreground
#47444bdarkslategray
#b7b4bbsilver
Accent
#3e206fmidnightblue
#3e206fmidnightblue
Accent foreground
#dcd0f1gainsboro
#dcd0f1gainsboro
Destructive
#ca2807firebrick
#f85130tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#516f20darkolivegreen
#516f20darkolivegreen

Contrast

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

Light mode
Text on background18.59:1AAA
Text on card18.59:1AAA
Primary button5.79:1AA
Secondary button8.72:1AAA
Muted text7.52:1AAA
Accent8.72:1AAA
Destructive5.51:1AA
Dark mode
Text on background20.18:1AAA
Text on card20.18:1AAA
Primary button5.79:1AA
Secondary button8.72:1AAA
Muted text9.06:1AAA
Accent8.72:1AAA
Destructive3.38: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.184 0.034 125.858);
  --muted: oklch(0.921 0.016 303.381);
  --muted-foreground: oklch(0.391 0.012 303.171);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.184 0.034 125.858);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.184 0.034 125.858);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.5 0.111 128.037);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.332 0.129 296.271);
  --secondary-foreground: oklch(0.877 0.048 302.833);
  --accent: oklch(0.332 0.129 296.271);
  --accent-foreground: oklch(0.877 0.048 302.833);
  --destructive: oklch(0.543 0.201 32.196);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.5 0.111 128.037);
  --chart-1: oklch(0.5 0.111 128.037);
  --chart-2: oklch(0.332 0.129 296.271);
  --chart-3: oklch(0.332 0.129 296.271);
  --chart-4: oklch(0.355 0.139 296.099);
  --chart-5: oklch(0.506 0.115 128.266);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.015 123.153);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.19 0.024 301.754);
  --muted-foreground: oklch(0.774 0.01 303.44);
  --popover: oklch(0.125 0.015 123.153);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.125 0.015 123.153);
  --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.5 0.111 128.037);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.332 0.129 296.271);
  --secondary-foreground: oklch(0.877 0.048 302.833);
  --accent: oklch(0.332 0.129 296.271);
  --accent-foreground: oklch(0.877 0.048 302.833);
  --destructive: oklch(0.662 0.208 33.187);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.5 0.111 128.037);
  --chart-1: oklch(0.5 0.111 128.037);
  --chart-2: oklch(0.332 0.129 296.271);
  --chart-3: oklch(0.332 0.129 296.271);
  --chart-4: oklch(0.355 0.139 296.099);
  --chart-5: oklch(0.506 0.115 128.266);
}