Charming for shadcn/ui

Charming is a shadcn/ui theme built around a deep blue primary color (#203356) with deep indigo accents (#282056). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the deep blue primary (#203356) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfcfewhite
#000000black
Foreground
#02060dblack
#ffffffwhite
Card
#fbfcfewhite
#000000black
Card foreground
#02060dblack
#ffffffwhite
Popover
#fbfcfewhite
#000000black
Popover foreground
#02060dblack
#ffffffwhite
Primary
#203356darkslategray
#203356darkslategray
Primary foreground
#c0cee8lightsteelblue
#c0cee8lightsteelblue
Secondary
#204e56darkslategray
#204e56darkslategray
Secondary foreground
#c0e2e8powderblue
#c0e2e8powderblue
Muted
#d1dee0gainsboro
#1f2c2edarkslategray
Muted foreground
#596669dimgray
#96a4a6darkgray
Accent
#282056midnightblue
#282056midnightblue
Accent foreground
#c6c0e8thistle
#c6c0e8thistle
Destructive
#bd3c05firebrick
#f95610orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#203356darkslategray
#203356darkslategray

Contrast

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

Light mode
Text on background19.78:1AAA
Text on card19.78:1AAA
Primary button7.97:1AAA
Secondary button6.73:1AA
Muted text4.32:1AA Large
Accent8.49:1AAA
Destructive5.50:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.97:1AAA
Secondary button6.73:1AA
Muted text5.62:1AA
Accent8.49:1AAA
Destructive3.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 263.049);
  --foreground: oklch(0.12 0.022 252.395);
  --muted: oklch(0.892 0.014 209.435);
  --muted-foreground: oklch(0.501 0.017 209.433);
  --popover: oklch(0.991 0.002 263.049);
  --popover-foreground: oklch(0.12 0.022 252.395);
  --card: oklch(0.991 0.002 263.049);
  --card-foreground: oklch(0.12 0.022 252.395);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.322 0.067 261.876);
  --primary-foreground: oklch(0.848 0.039 262.908);
  --secondary: oklch(0.394 0.051 210.754);
  --secondary-foreground: oklch(0.889 0.037 209.447);
  --accent: oklch(0.285 0.094 285.654);
  --accent-foreground: oklch(0.825 0.056 292.008);
  --destructive: oklch(0.539 0.174 38.098);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.322 0.067 261.876);
  --chart-1: oklch(0.322 0.067 261.876);
  --chart-2: oklch(0.394 0.051 210.754);
  --chart-3: oklch(0.285 0.094 285.654);
  --chart-4: oklch(0.428 0.057 210.822);
  --chart-5: oklch(0.321 0.072 261.789);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.281 0.018 209.549);
  --muted-foreground: oklch(0.707 0.015 209.43);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.322 0.067 261.876);
  --primary-foreground: oklch(0.848 0.039 262.908);
  --secondary: oklch(0.394 0.051 210.754);
  --secondary-foreground: oklch(0.889 0.037 209.447);
  --accent: oklch(0.285 0.094 285.654);
  --accent-foreground: oklch(0.825 0.056 292.008);
  --destructive: oklch(0.668 0.21 38.673);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.322 0.067 261.876);
  --chart-1: oklch(0.322 0.067 261.876);
  --chart-2: oklch(0.394 0.051 210.754);
  --chart-3: oklch(0.285 0.094 285.654);
  --chart-4: oklch(0.428 0.057 210.822);
  --chart-5: oklch(0.321 0.072 261.789);
}