Clearance for shadcn/ui

Clearance is a shadcn/ui theme built around a deep purple primary color (#3a0838) with deep green accents (#083a0a). The light mode uses a neutral background (#fdf7fc). Dark mode keeps the deep purple primary (#3a0838) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fcsnow
#000000black
Foreground
#080307black
#fcf8fcsnow
Card
#fbf3fbghostwhite
#030303black
Card foreground
#040104black
#fdfcfdwhite
Popover
#fbf3fbghostwhite
#030303black
Popover foreground
#040104black
#fdfcfdwhite
Primary
#3a0838midnightblue
#3a0838midnightblue
Primary foreground
#ee87eaviolet
#ee87eaviolet
Secondary
#083a0adarkgreen
#083a0adarkgreen
Secondary foreground
#2de133limegreen
#2de133limegreen
Muted
#d6e1d6gainsboro
#1e291eblack
Muted foreground
#5f6760dimgray
#98a098darkgray
Accent
#083a0adarkgreen
#083a0adarkgreen
Accent foreground
#2de133limegreen
#2de133limegreen
Destructive
#a63f07saddlebrown
#f05a0aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3a0838midnightblue
#3a0838midnightblue

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card19.15:1AAA
Primary button7.29:1AAA
Secondary button7.36:1AAA
Muted text4.33:1AA Large
Accent7.36:1AAA
Destructive6.28:1AA
Dark mode
Text on background19.97:1AAA
Text on card20.20:1AAA
Primary button7.29:1AAA
Secondary button7.36:1AAA
Muted text5.59:1AA
Accent7.36:1AAA
Destructive3.39:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.009 326.62);
  --foreground: oklch(0.109 0.022 327.851);
  --muted: oklch(0.898 0.019 146.353);
  --muted-foreground: oklch(0.506 0.015 146.271);
  --popover: oklch(0.974 0.013 326.66);
  --popover-foreground: oklch(0.087 0.018 327.851);
  --card: oklch(0.974 0.013 326.66);
  --card-foreground: oklch(0.087 0.018 327.851);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.252 0.099 329.497);
  --primary-foreground: oklch(0.766 0.175 328.329);
  --secondary: oklch(0.305 0.092 143.325);
  --secondary-foreground: oklch(0.794 0.25 143.069);
  --accent: oklch(0.305 0.092 143.325);
  --accent-foreground: oklch(0.794 0.25 143.069);
  --destructive: oklch(0.504 0.148 42.075);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.252 0.099 329.497);
  --chart-1: oklch(0.252 0.099 329.497);
  --chart-2: oklch(0.305 0.092 143.325);
  --chart-3: oklch(0.305 0.092 143.325);
  --chart-4: oklch(0.349 0.107 143.201);
  --chart-5: oklch(0.254 0.102 329.561);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.006 326.596);
  --muted: oklch(0.268 0.026 145.66);
  --muted-foreground: oklch(0.695 0.014 146.36);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.992 0.003 326.568);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.003 326.568);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.252 0.099 329.497);
  --primary-foreground: oklch(0.766 0.175 328.329);
  --secondary: oklch(0.305 0.092 143.325);
  --secondary-foreground: oklch(0.794 0.25 143.069);
  --accent: oklch(0.305 0.092 143.325);
  --accent-foreground: oklch(0.794 0.25 143.069);
  --destructive: oklch(0.658 0.198 41.295);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.252 0.099 329.497);
  --chart-1: oklch(0.252 0.099 329.497);
  --chart-2: oklch(0.305 0.092 143.325);
  --chart-3: oklch(0.305 0.092 143.325);
  --chart-4: oklch(0.349 0.107 143.201);
  --chart-5: oklch(0.254 0.102 329.561);
}