Imaginary for shadcn/ui

Imaginary is a shadcn/ui theme built around a deep purple primary color (#3d0d40) with deep green accents (#0f400d). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep purple primary (#3d0d40) on a neutral background (#080208).

Color palette

TokenLightDark
Background
#ffffffwhite
#080208black
Foreground
#0b030cblack
#fbf9fbsnow
Card
#ffffffwhite
#080208black
Card foreground
#0b030cblack
#fbf9fbsnow
Popover
#ffffffwhite
#080208black
Popover foreground
#0b030cblack
#fbf9fbsnow
Primary
#3d0d40midnightblue
#3d0d40midnightblue
Primary foreground
#e695eaplum
#e695eaplum
Secondary
#0f400ddarkgreen
#0f400ddarkgreen
Secondary foreground
#47d93flimegreen
#47d93flimegreen
Muted
#dfe7dfgainsboro
#182018black
Muted foreground
#3d423ddarkslategray
#bdc2bdsilver
Accent
#0f400ddarkgreen
#0f400ddarkgreen
Accent foreground
#47d93flimegreen
#47d93flimegreen
Destructive
#cb3b06firebrick
#ed4507orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3d0d40midnightblue
#3d0d40midnightblue

Contrast

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

Light mode
Text on background20.33:1AAA
Text on card20.33:1AAA
Primary button7.40:1AAA
Secondary button6.41:1AA
Muted text8.14:1AAA
Accent6.41:1AA
Destructive5.05:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button7.40:1AAA
Secondary button6.41:1AA
Muted text9.20:1AAA
Accent6.41:1AA
Destructive3.84:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.028 325.654);
  --muted: oklch(0.92 0.014 144.04);
  --muted-foreground: oklch(0.374 0.011 143.961);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.028 325.654);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.028 325.654);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.268 0.102 325.808);
  --primary-foreground: oklch(0.779 0.146 325.117);
  --secondary: oklch(0.327 0.095 142.373);
  --secondary-foreground: oklch(0.779 0.228 142.364);
  --accent: oklch(0.327 0.095 142.373);
  --accent-foreground: oklch(0.779 0.228 142.364);
  --destructive: oklch(0.561 0.188 36.247);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.268 0.102 325.808);
  --chart-1: oklch(0.268 0.102 325.808);
  --chart-2: oklch(0.327 0.095 142.373);
  --chart-3: oklch(0.327 0.095 142.373);
  --chart-4: oklch(0.368 0.109 142.348);
  --chart-5: oklch(0.269 0.105 325.825);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.026 325.85);
  --foreground: oklch(0.984 0.003 324.149);
  --muted: oklch(0.234 0.02 143.622);
  --muted-foreground: oklch(0.808 0.009 144.066);
  --popover: oklch(0.108 0.026 325.85);
  --popover-foreground: oklch(0.984 0.003 324.149);
  --card: oklch(0.108 0.026 325.85);
  --card-foreground: oklch(0.984 0.003 324.149);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.268 0.102 325.808);
  --primary-foreground: oklch(0.779 0.146 325.117);
  --secondary: oklch(0.327 0.095 142.373);
  --secondary-foreground: oklch(0.779 0.228 142.364);
  --accent: oklch(0.327 0.095 142.373);
  --accent-foreground: oklch(0.779 0.228 142.364);
  --destructive: oklch(0.63 0.213 35.997);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.268 0.102 325.808);
  --chart-1: oklch(0.268 0.102 325.808);
  --chart-2: oklch(0.327 0.095 142.373);
  --chart-3: oklch(0.327 0.095 142.373);
  --chart-4: oklch(0.368 0.109 142.348);
  --chart-5: oklch(0.269 0.105 325.825);
}