Charlatan for shadcn/ui

Charlatan is a shadcn/ui theme built around a near-black primary color (#000503) with near-black accents (#050002). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#000503) on a neutral background (#010403).

Color palette

TokenLightDark
Background
#ffffffwhite
#010403black
Foreground
#04100bblack
#f9fbfamintcream
Card
#fcfcfcsnow
#030805black
Card foreground
#030c08black
#fcfdfdwhite
Popover
#ffffffwhite
#010403black
Popover foreground
#04100bblack
#f9fbfamintcream
Primary
#000503black
#000503black
Primary foreground
#00d173springgreen
#00d173springgreen
Secondary
#050002black
#050002black
Secondary foreground
#ff3892deeppink
#ff3892deeppink
Muted
#e9dce2gainsboro
#23161bblack
Muted foreground
#666063dimgray
#9f999bdarkgray
Accent
#050002black
#050002black
Accent foreground
#ff3892deeppink
#ff3892deeppink
Destructive
#89160bdarkred
#ef4c3etomato
Destructive foreground
#fbcfcbpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#000503black
#000503black

Contrast

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

Light mode
Text on background19.37:1AAA
Text on card19.38:1AAA
Primary button10.13:1AAA
Secondary button6.18:1AA
Muted text4.64:1AA
Accent6.18:1AA
Destructive6.84:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.84:1AAA
Primary button10.13:1AAA
Secondary button6.18:1AA
Muted text6.26:1AA
Accent6.18:1AA
Destructive3.62:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.159 0.022 165.505);
  --muted: oklch(0.908 0.016 348.291);
  --muted-foreground: oklch(0.497 0.009 348.282);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.159 0.022 165.505);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.142 0.019 167.626);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.103 0.021 168.179);
  --primary-foreground: oklch(0.755 0.192 153.582);
  --secondary: oklch(0.077 0.032 347.168);
  --secondary-foreground: oklch(0.671 0.239 359.229);
  --accent: oklch(0.077 0.032 347.168);
  --accent-foreground: oklch(0.671 0.239 359.229);
  --destructive: oklch(0.407 0.151 30.032);
  --destructive-foreground: oklch(0.891 0.05 24.214);
  --ring: oklch(0.103 0.021 168.179);
  --chart-1: oklch(0.103 0.021 168.179);
  --chart-2: oklch(0.077 0.032 347.168);
  --chart-3: oklch(0.077 0.032 347.168);
  --chart-4: oklch(0.127 0.053 350.529);
  --chart-5: oklch(0.103 0.021 168.188);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.011 168.01);
  --foreground: oklch(0.986 0.002 167.743);
  --muted: oklch(0.218 0.023 350.568);
  --muted-foreground: oklch(0.687 0.008 348.127);
  --popover: oklch(0.097 0.011 168.01);
  --popover-foreground: oklch(0.986 0.002 167.743);
  --card: oklch(0.123 0.014 168.01);
  --card-foreground: oklch(0.993 0.001 167.778);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.103 0.021 168.179);
  --primary-foreground: oklch(0.755 0.192 153.582);
  --secondary: oklch(0.077 0.032 347.168);
  --secondary-foreground: oklch(0.671 0.239 359.229);
  --accent: oklch(0.077 0.032 347.168);
  --accent-foreground: oklch(0.671 0.239 359.229);
  --destructive: oklch(0.645 0.202 29.023);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.103 0.021 168.179);
  --chart-1: oklch(0.103 0.021 168.179);
  --chart-2: oklch(0.077 0.032 347.168);
  --chart-3: oklch(0.077 0.032 347.168);
  --chart-4: oklch(0.127 0.053 350.529);
  --chart-5: oklch(0.103 0.021 168.188);
}