Canon for shadcn/ui

Canon is a shadcn/ui theme built around a deep pink primary color (#430f2b) with muted light pink accents (#decfd7). The light mode uses a neutral background (#fdf7fa). Dark mode keeps the deep pink primary (#430f2b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdf7fasnow
#000000black
Foreground
#080305black
#f9f5f8whitesmoke
Card
#fcf3f8lavenderblush
#030303black
Card foreground
#040103black
#fbf8fasnow
Popover
#fcf3f8lavenderblush
#030303black
Popover foreground
#040103black
#fbf8fasnow
Primary
#430f2bdarkslategray
#430f2bdarkslategray
Primary foreground
#e99bc6plum
#e99bc6plum
Secondary
#decfd7lightgrey
#201d1fblack
Secondary foreground
#48323edarkslategray
#bcb3b8silver
Muted
#e7cbdathistle
#341828darkslategray
Muted foreground
#4b3f45darkslategray
#c0b4bbsilver
Accent
#decfd7lightgrey
#201d1fblack
Accent foreground
#48323edarkslategray
#bcb3b8silver
Destructive
#a82d0bfirebrick
#f04819orangered
Destructive foreground
#fdece7linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#430f2bdarkslategray
#430f2bdarkslategray

Contrast

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

Light mode
Text on background19.34:1AAA
Text on card19.07:1AAA
Primary button7.43:1AAA
Secondary button7.76:1AAA
Muted text6.64:1AA
Accent7.76:1AAA
Destructive6.03:1AA
Dark mode
Text on background19.44:1AAA
Text on card19.60:1AAA
Primary button7.43:1AAA
Secondary button8.18:1AAA
Muted text8.00:1AAA
Accent8.18:1AAA
Destructive3.71:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.008 342.814);
  --foreground: oklch(0.108 0.018 342.589);
  --muted: oklch(0.869 0.037 343.623);
  --muted-foreground: oklch(0.382 0.02 343.876);
  --popover: oklch(0.972 0.012 342.915);
  --popover-foreground: oklch(0.085 0.015 342.589);
  --card: oklch(0.972 0.012 342.915);
  --card-foreground: oklch(0.085 0.015 342.589);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.269 0.087 350.657);
  --primary-foreground: oklch(0.778 0.108 345.772);
  --secondary: oklch(0.868 0.02 343.161);
  --secondary-foreground: oklch(0.348 0.037 345.072);
  --accent: oklch(0.868 0.02 343.161);
  --accent-foreground: oklch(0.348 0.037 345.072);
  --destructive: oklch(0.486 0.164 34.682);
  --destructive-foreground: oklch(0.955 0.02 35.957);
  --ring: oklch(0.269 0.087 350.657);
  --chart-1: oklch(0.269 0.087 350.657);
  --chart-2: oklch(0.868 0.02 343.161);
  --chart-3: oklch(0.868 0.02 343.161);
  --chart-4: oklch(0.893 0.016 343.045);
  --chart-5: oklch(0.27 0.09 351.053);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.006 342.757);
  --muted: oklch(0.256 0.05 347.02);
  --muted-foreground: oklch(0.782 0.017 343.14);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.983 0.004 342.71);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.983 0.004 342.71);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.269 0.087 350.657);
  --primary-foreground: oklch(0.778 0.108 345.772);
  --secondary: oklch(0.235 0.007 343.311);
  --secondary-foreground: oklch(0.776 0.012 342.984);
  --accent: oklch(0.235 0.007 343.311);
  --accent-foreground: oklch(0.776 0.012 342.984);
  --destructive: oklch(0.639 0.212 34.944);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.269 0.087 350.657);
  --chart-1: oklch(0.269 0.087 350.657);
  --chart-2: oklch(0.235 0.007 343.311);
  --chart-3: oklch(0.235 0.007 343.311);
  --chart-4: oklch(0.266 0.008 343.358);
  --chart-5: oklch(0.27 0.09 351.053);
}