Duck for shadcn/ui

Duck is a shadcn/ui theme built around a light purple primary color (#e7c0e7) with light pink accents (#e7c0d4). The light mode uses a neutral background (#fefbfe). Dark mode keeps the light purple primary (#e7c0e7) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#000000black
#fdfcfdwhite
Card
#fdf7fdsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#fdf7fdsnow
#030303black
Popover foreground
#000000black
#ffffffwhite
Primary
#e7c0e7thistle
#e7c0e7thistle
Primary foreground
#552055indigo
#552055indigo
Secondary
#d4c0e7thistle
#d4c0e7thistle
Secondary foreground
#3b2055midnightblue
#3b2055midnightblue
Muted
#e5deedlavender
#1a1221black
Muted foreground
#4a494bdarkslategray
#b5b4b6silver
Accent
#e7c0d4thistle
#e7c0d4thistle
Accent foreground
#55203bdarkslategray
#55203bdarkslategray
Destructive
#6c1904maroon
#dc3309orangered
Destructive foreground
#fbb8a7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7c0e7thistle
#e7c0e7thistle

Contrast

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

Light mode
Text on background20.43:1AAA
Text on card19.87:1AAA
Primary button7.60:1AAA
Secondary button8.20:1AAA
Muted text6.84:1AA
Accent7.79:1AAA
Destructive7.04:1AAA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button7.60:1AAA
Secondary button8.20:1AAA
Muted text8.81:1AAA
Accent7.79:1AAA
Destructive4.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.005 325.615);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.912 0.021 308.209);
  --muted-foreground: oklch(0.407 0.003 308.389);
  --popover: oklch(0.982 0.01 325.655);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.01 325.655);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.854 0.068 326.153);
  --primary-foreground: oklch(0.345 0.107 327.588);
  --secondary: oklch(0.837 0.058 307.699);
  --secondary-foreground: oklch(0.308 0.094 304.538);
  --accent: oklch(0.848 0.051 346.652);
  --accent-foreground: oklch(0.332 0.085 351.562);
  --destructive: oklch(0.352 0.119 34.458);
  --destructive-foreground: oklch(0.84 0.083 34.516);
  --ring: oklch(0.854 0.068 326.153);
  --chart-1: oklch(0.854 0.068 326.153);
  --chart-2: oklch(0.837 0.058 307.699);
  --chart-3: oklch(0.848 0.051 346.652);
  --chart-4: oklch(0.866 0.047 307.86);
  --chart-5: oklch(0.853 0.073 326.19);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 325.587);
  --muted: oklch(0.2 0.03 306.775);
  --muted-foreground: oklch(0.772 0.002 308.428);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.854 0.068 326.153);
  --primary-foreground: oklch(0.345 0.107 327.588);
  --secondary: oklch(0.837 0.058 307.699);
  --secondary-foreground: oklch(0.308 0.094 304.538);
  --accent: oklch(0.848 0.051 346.652);
  --accent-foreground: oklch(0.332 0.085 351.562);
  --destructive: oklch(0.586 0.21 33.357);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.854 0.068 326.153);
  --chart-1: oklch(0.854 0.068 326.153);
  --chart-2: oklch(0.837 0.058 307.699);
  --chart-3: oklch(0.848 0.051 346.652);
  --chart-4: oklch(0.866 0.047 307.86);
  --chart-5: oklch(0.853 0.073 326.19);
}