Ajar for shadcn/ui

Ajar is a shadcn/ui theme built around a vivid purple primary color (#f66ae1) with vivid green accents (#6af67f). The light mode uses a neutral background (#fcf7fc). Dark mode keeps the vivid purple primary (#f66ae1) on a purple-tinted background (#0b040a).

Color palette

TokenLightDark
Background
#fcf7fcsnow
#0b040ablack
Foreground
#000000black
#f8f6f8whitesmoke
Card
#fbf4faghostwhite
#0f050eblack
Card foreground
#000000black
#fbf9fasnow
Popover
#fbf4faghostwhite
#0f050eblack
Popover foreground
#000000black
#fbf9fasnow
Primary
#f66ae1violet
#f66ae1violet
Primary foreground
#2b0325black
#2b0325black
Secondary
#6af67flightgreen
#6af67flightgreen
Secondary foreground
#032b09black
#032b09black
Muted
#d2e4d5gainsboro
#1b2d1dblack
Muted foreground
#59695bdimgray
#96a699darkgray
Accent
#6af67flightgreen
#6af67flightgreen
Accent foreground
#032b09black
#032b09black
Destructive
#8d2f07saddlebrown
#f2520dorangered
Destructive foreground
#fcd9cabisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f66ae1violet
#f66ae1violet

Contrast

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

Light mode
Text on background19.91:1AAA
Text on card19.38:1AAA
Primary button7.05:1AAA
Secondary button11.11:1AAA
Muted text4.40:1AA Large
Accent11.11:1AAA
Destructive6.26:1AA
Dark mode
Text on background18.84:1AAA
Text on card19.08:1AAA
Primary button7.05:1AAA
Secondary button11.11:1AAA
Muted text5.72:1AA
Accent11.11:1AAA
Destructive3.50:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.008 330.345);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.902 0.028 149.837);
  --muted-foreground: oklch(0.502 0.028 149.496);
  --popover: oklch(0.974 0.011 330.396);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.974 0.011 330.396);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.735 0.216 333.731);
  --primary-foreground: oklch(0.203 0.082 334.946);
  --secondary: oklch(0.868 0.2 146.501);
  --secondary-foreground: oklch(0.253 0.074 145.624);
  --accent: oklch(0.868 0.2 146.501);
  --accent-foreground: oklch(0.253 0.074 145.624);
  --destructive: oklch(0.44 0.134 39.338);
  --destructive-foreground: oklch(0.91 0.045 44.553);
  --ring: oklch(0.735 0.216 333.731);
  --chart-1: oklch(0.735 0.216 333.731);
  --chart-2: oklch(0.868 0.2 146.501);
  --chart-3: oklch(0.868 0.2 146.501);
  --chart-4: oklch(0.877 0.184 146.945);
  --chart-5: oklch(0.736 0.222 333.83);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.023 331.351);
  --foreground: oklch(0.976 0.003 330.287);
  --muted: oklch(0.275 0.037 148.329);
  --muted-foreground: oklch(0.709 0.026 149.764);
  --popover: oklch(0.139 0.026 332.018);
  --popover-foreground: oklch(0.984 0.002 330.273);
  --card: oklch(0.139 0.026 332.018);
  --card-foreground: oklch(0.984 0.002 330.273);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.735 0.216 333.731);
  --primary-foreground: oklch(0.203 0.082 334.946);
  --secondary: oklch(0.868 0.2 146.501);
  --secondary-foreground: oklch(0.253 0.074 145.624);
  --accent: oklch(0.868 0.2 146.501);
  --accent-foreground: oklch(0.253 0.074 145.624);
  --destructive: oklch(0.652 0.207 38.36);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.735 0.216 333.731);
  --chart-1: oklch(0.735 0.216 333.731);
  --chart-2: oklch(0.868 0.2 146.501);
  --chart-3: oklch(0.868 0.2 146.501);
  --chart-4: oklch(0.877 0.184 146.945);
  --chart-5: oklch(0.736 0.222 333.83);
}