Puzzle for shadcn/ui

Puzzle is a shadcn/ui theme built around an orange primary color (#7b613d) with violet accents (#613d7b). The light mode uses a neutral background (#ffffff). Dark mode keeps the orange primary (#7b613d) on an orange-tinted background (#100b05).

Color palette

TokenLightDark
Background
#ffffffwhite
#100b05black
Foreground
#100b04black
#ffffffwhite
Card
#ffffffwhite
#100b05black
Card foreground
#100b04black
#ffffffwhite
Popover
#ffffffwhite
#100b05black
Popover foreground
#100b04black
#ffffffwhite
Primary
#7b613ddarkolivegreen
#7b613ddarkolivegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#3d7b61seagreen
#3d7b61seagreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f1f3f2whitesmoke
#0c0e0dblack
Muted foreground
#4e5552darkslategray
#aab1aedarkgray
Accent
#613d7bdarkslateblue
#613d7bdarkslateblue
Accent foreground
#f5f1f8whitesmoke
#f5f1f8whitesmoke
Destructive
#bf480dchocolate
#f17537tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7b613ddarkolivegreen
#7b613ddarkolivegreen

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button5.80:1AA
Secondary button4.99:1AA
Muted text6.88:1AA
Accent7.67:1AAA
Destructive5.05:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button5.80:1AA
Secondary button4.99:1AA
Muted text8.87:1AAA
Accent7.67:1AAA
Destructive7.33:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.154 0.018 79.84);
  --muted: oklch(0.963 0.002 169.599);
  --muted-foreground: oklch(0.442 0.009 169.057);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.154 0.018 79.84);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.154 0.018 79.84);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.51 0.062 74.979);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.533 0.077 164.404);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.429 0.107 309.518);
  --accent-foreground: oklch(0.964 0.01 311.64);
  --destructive: oklch(0.557 0.164 41.388);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.51 0.062 74.979);
  --chart-1: oklch(0.51 0.062 74.979);
  --chart-2: oklch(0.533 0.077 164.404);
  --chart-3: oklch(0.429 0.107 309.518);
  --chart-4: oklch(0.565 0.083 164.351);
  --chart-5: oklch(0.513 0.067 74.698);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.017 79.708);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.16 0.004 168.985);
  --muted-foreground: oklch(0.753 0.008 169.357);
  --popover: oklch(0.154 0.017 79.708);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.154 0.017 79.708);
  --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.51 0.062 74.979);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.533 0.077 164.404);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.429 0.107 309.518);
  --accent-foreground: oklch(0.964 0.01 311.64);
  --destructive: oklch(0.698 0.17 44.6);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.51 0.062 74.979);
  --chart-1: oklch(0.51 0.062 74.979);
  --chart-2: oklch(0.533 0.077 164.404);
  --chart-3: oklch(0.429 0.107 309.518);
  --chart-4: oklch(0.565 0.083 164.351);
  --chart-5: oklch(0.513 0.067 74.698);
}