Tan for shadcn/ui

Tan is a shadcn/ui theme built around a vivid deep purple primary color (#480542) with vivid deep pink accents (#480521). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the vivid deep purple primary (#480542) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#030203black
Foreground
#0e020dblack
#fbf9fbsnow
Card
#fcf8fcsnow
#030203black
Card foreground
#0e020dblack
#fbf9fbsnow
Popover
#fcf8fcsnow
#030203black
Popover foreground
#0e020dblack
#fbf9fbsnow
Primary
#480542indigo
#480542indigo
Primary foreground
#f787eeviolet
#f787eeviolet
Secondary
#2c0548midnightblue
#2c0548midnightblue
Secondary foreground
#c987f7violet
#c987f7violet
Muted
#f3f1f4whitesmoke
#0d0b0eblack
Muted foreground
#4e4356darkslategray
#b4a9bcdarkgray
Accent
#480521maroon
#480521maroon
Accent foreground
#f787b6hotpink
#f787b6hotpink
Destructive
#d13100firebrick
#f03800orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#480542indigo
#480542indigo

Contrast

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

Light mode
Text on background19.29:1AAA
Text on card19.29:1AAA
Primary button7.02:1AAA
Secondary button6.79:1AA
Muted text8.24:1AAA
Accent6.90:1AA
Destructive5.06:1AA
Dark mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button7.02:1AAA
Secondary button6.79:1AA
Muted text8.71:1AAA
Accent6.90:1AA
Destructive3.99:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.007 328.14);
  --foreground: oklch(0.121 0.041 330.286);
  --muted: oklch(0.959 0.005 311.684);
  --muted-foreground: oklch(0.401 0.036 311.001);
  --popover: oklch(0.983 0.007 328.14);
  --popover-foreground: oklch(0.121 0.041 330.286);
  --card: oklch(0.983 0.007 328.14);
  --card-foreground: oklch(0.121 0.041 330.286);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.282 0.12 332.241);
  --primary-foreground: oklch(0.78 0.184 330.296);
  --secondary: oklch(0.237 0.114 305.239);
  --secondary-foreground: oklch(0.733 0.169 309.717);
  --accent: oklch(0.264 0.099 2.597);
  --accent-foreground: oklch(0.759 0.145 354.736);
  --destructive: oklch(0.563 0.202 34.15);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.12 332.241);
  --chart-1: oklch(0.282 0.12 332.241);
  --chart-2: oklch(0.237 0.114 305.239);
  --chart-3: oklch(0.264 0.099 2.597);
  --chart-4: oklch(0.266 0.129 304.657);
  --chart-5: oklch(0.283 0.122 332.323);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.012 328.907);
  --foreground: oklch(0.984 0.004 328.102);
  --muted: oklch(0.154 0.008 311.326);
  --muted-foreground: oklch(0.749 0.031 311.393);
  --popover: oklch(0.088 0.012 328.907);
  --popover-foreground: oklch(0.984 0.004 328.102);
  --card: oklch(0.088 0.012 328.907);
  --card-foreground: oklch(0.984 0.004 328.102);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.282 0.12 332.241);
  --primary-foreground: oklch(0.78 0.184 330.296);
  --secondary: oklch(0.237 0.114 305.239);
  --secondary-foreground: oklch(0.733 0.169 309.717);
  --accent: oklch(0.264 0.099 2.597);
  --accent-foreground: oklch(0.759 0.145 354.736);
  --destructive: oklch(0.623 0.225 33.904);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.282 0.12 332.241);
  --chart-1: oklch(0.282 0.12 332.241);
  --chart-2: oklch(0.237 0.114 305.239);
  --chart-3: oklch(0.264 0.099 2.597);
  --chart-4: oklch(0.266 0.129 304.657);
  --chart-5: oklch(0.283 0.122 332.323);
}