Charm for shadcn/ui

Charm is a shadcn/ui theme built around a near-white primary color (#fffbf5) with near-white accents (#fdfff5). The light mode uses a neutral background (#fdfbf7). Dark mode keeps the near-white primary (#fffbf5) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbf7snow
#000000black
Foreground
#100c04black
#f9f8f5whitesmoke
Card
#fbf8f3floralwhite
#030303black
Card foreground
#0c0903black
#fbfaf9snow
Popover
#fbf8f3floralwhite
#030303black
Popover foreground
#0c0903black
#fbfaf9snow
Primary
#fffbf5floralwhite
#fffbf5floralwhite
Primary foreground
#583904saddlebrown
#583904saddlebrown
Secondary
#fff6f5lavenderblush
#fff6f5lavenderblush
Secondary foreground
#b92009firebrick
#b92009firebrick
Muted
#eceaealinen
#151413black
Muted foreground
#715956dimgray
#a9918erosybrown
Accent
#fdfff5ivory
#fdfff5ivory
Accent foreground
#4d5804darkolivegreen
#4d5804darkolivegreen
Destructive
#5d1a09maroon
#df3e16orangered
Destructive foreground
#f6b3a2lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fffbf5floralwhite
#fffbf5floralwhite

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.83:1AAA
Primary button10.17:1AAA
Secondary button6.04:1AA
Muted text5.35:1AA
Accent7.64:1AAA
Destructive7.36:1AAA
Dark mode
Text on background19.77:1AAA
Text on card19.83:1AAA
Primary button10.17:1AAA
Secondary button6.04:1AA
Muted text6.25:1AA
Accent7.64:1AAA
Destructive4.34:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 81.513);
  --foreground: oklch(0.157 0.02 84.597);
  --muted: oklch(0.938 0.002 27.944);
  --muted-foreground: oklch(0.488 0.033 28.422);
  --popover: oklch(0.981 0.007 81.512);
  --popover-foreground: oklch(0.141 0.017 87.706);
  --card: oklch(0.981 0.007 81.512);
  --card-foreground: oklch(0.141 0.017 87.706);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.989 0.009 81.511);
  --primary-foreground: oklch(0.372 0.076 74.086);
  --secondary: oklch(0.981 0.009 27.979);
  --secondary-foreground: oklch(0.507 0.19 31.326);
  --accent: oklch(0.995 0.012 112.774);
  --accent-foreground: oklch(0.434 0.099 117.998);
  --destructive: oklch(0.325 0.101 34.81);
  --destructive-foreground: oklch(0.825 0.082 34.523);
  --ring: oklch(0.989 0.009 81.511);
  --chart-1: oklch(0.989 0.009 81.511);
  --chart-2: oklch(0.981 0.009 27.979);
  --chart-3: oklch(0.995 0.012 112.774);
  --chart-4: oklch(1.01 0.004 207.915);
  --chart-5: oklch(0.99 0.009 81.511);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.004 81.514);
  --muted: oklch(0.192 0.003 28.015);
  --muted-foreground: oklch(0.678 0.03 28.217);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.986 0.002 81.514);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.986 0.002 81.514);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.989 0.009 81.511);
  --primary-foreground: oklch(0.372 0.076 74.086);
  --secondary: oklch(0.981 0.009 27.979);
  --secondary-foreground: oklch(0.507 0.19 31.326);
  --accent: oklch(0.995 0.012 112.774);
  --accent-foreground: oklch(0.434 0.099 117.998);
  --destructive: oklch(0.6 0.203 34.157);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.989 0.009 81.511);
  --chart-1: oklch(0.989 0.009 81.511);
  --chart-2: oklch(0.981 0.009 27.979);
  --chart-3: oklch(0.995 0.012 112.774);
  --chart-4: oklch(1.01 0.004 207.915);
  --chart-5: oklch(0.99 0.009 81.511);
}