Amethyst for shadcn/ui

Amethyst is a shadcn/ui theme built around a near-white primary color (#ffffff) with vivid deep violet accents (#450070). The light mode uses a violet-tinted background (#160024). Dark mode keeps the near-white primary (#ffffff) on a violet-tinted background (#160024).

Color palette

TokenLightDark
Background
#160024black
#160024black
Foreground
#d4d4d4lightgrey
#d4d4d4lightgrey
Card
#10001ablack
#10001ablack
Card foreground
#e0e0e0gainsboro
#e0e0e0gainsboro
Popover
#0d0014black
#0d0014black
Popover foreground
#edededwhitesmoke
#edededwhitesmoke
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#27222bdarkslategray
#27222bdarkslategray
Muted foreground
#a89bb0darkgray
#a89bb0darkgray
Accent
#450070indigo
#450070indigo
Accent foreground
#dca3ffplum
#dca3ffplum
Destructive
#f93c1forangered
#f93c1forangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#25033amidnightblue
#25033amidnightblue
Input
#2e0449midnightblue
#2e0449midnightblue
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background13.37:1AAA
Text on card15.35:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.92:1AA
Accent7.20:1AAA
Destructive3.67:1AA Large
Dark mode
Text on background13.37:1AAA
Text on card15.35:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text5.92:1AA
Accent7.20:1AAA
Destructive3.67:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.154 0.078 310.172);
  --foreground: oklch(0.869 0 165.964);
  --muted: oklch(0.261 0.019 312.499);
  --muted-foreground: oklch(0.708 0.034 312.659);
  --popover: oklch(0.118 0.059 313.723);
  --popover-foreground: oklch(0.947 0 180);
  --card: oklch(0.131 0.065 312.254);
  --card-foreground: oklch(0.908 0 180);
  --border: oklch(0.21 0.099 307.967);
  --input: oklch(0.241 0.116 307.196);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.313 0.162 305.055);
  --accent-foreground: oklch(0.801 0.139 311.765);
  --destructive: oklch(0.644 0.228 31.617);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.313 0.162 305.055);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.078 310.172);
  --foreground: oklch(0.869 0 165.964);
  --muted: oklch(0.261 0.019 312.499);
  --muted-foreground: oklch(0.708 0.034 312.659);
  --popover: oklch(0.118 0.059 313.723);
  --popover-foreground: oklch(0.947 0 180);
  --card: oklch(0.131 0.065 312.254);
  --card-foreground: oklch(0.908 0 180);
  --border: oklch(0.21 0.099 307.967);
  --input: oklch(0.241 0.116 307.196);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.313 0.162 305.055);
  --accent-foreground: oklch(0.801 0.139 311.765);
  --destructive: oklch(0.644 0.228 31.617);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.313 0.162 305.055);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}