Perfect for shadcn/ui

Perfect is a shadcn/ui theme built around a purple primary color (#b257b0) with teal accents (#57b0b2). The light mode uses a neutral background (#fefbfe). Dark mode keeps the purple primary (#b257b0) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#120311black
#ffffffwhite
Card
#fefbfewhite
#000000black
Card foreground
#120311black
#ffffffwhite
Popover
#fefbfewhite
#000000black
Popover foreground
#120311black
#ffffffwhite
Primary
#b257b0mediumorchid
#b257b0mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#b0b257darkkhaki
#b0b257darkkhaki
Secondary foreground
#2a2a13black
#2a2a13black
Muted
#e2e2d5gainsboro
#2a2a1ddarkslategray
Muted foreground
#575742darkolivegreen
#bdbda8silver
Accent
#57b0b2cadetblue
#57b0b2cadetblue
Accent foreground
#000000black
#000000black
Destructive
#d04411chocolate
#e74b13orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b257b0mediumorchid
#b257b0mediumorchid

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.50:1AAA
Primary button4.29:1AA Large
Secondary button6.49:1AA
Muted text5.64:1AA
Accent8.29:1AAA
Destructive4.66:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button4.29:1AA Large
Secondary button6.49:1AA
Muted text7.56:1AAA
Accent8.29:1AAA
Destructive3.86:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 326.1);
  --foreground: oklch(0.137 0.044 328.216);
  --muted: oklch(0.909 0.018 107.53);
  --muted-foreground: oklch(0.451 0.033 108.456);
  --popover: oklch(0.991 0.006 326.1);
  --popover-foreground: oklch(0.137 0.044 328.216);
  --card: oklch(0.991 0.006 326.1);
  --card-foreground: oklch(0.137 0.044 328.216);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.6 0.162 327.986);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.743 0.114 109.743);
  --secondary-foreground: oklch(0.278 0.038 109.448);
  --accent: oklch(0.704 0.085 196.867);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.579 0.185 37.31);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.6 0.162 327.986);
  --chart-1: oklch(0.6 0.162 327.986);
  --chart-2: oklch(0.743 0.114 109.743);
  --chart-3: oklch(0.704 0.085 196.867);
  --chart-4: oklch(0.759 0.108 109.57);
  --chart-5: oklch(0.602 0.173 328.101);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.282 0.024 108.615);
  --muted-foreground: oklch(0.793 0.029 107.832);
  --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.6 0.162 327.986);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.743 0.114 109.743);
  --secondary-foreground: oklch(0.278 0.038 109.448);
  --accent: oklch(0.704 0.085 196.867);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.627 0.201 37.185);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.6 0.162 327.986);
  --chart-1: oklch(0.6 0.162 327.986);
  --chart-2: oklch(0.743 0.114 109.743);
  --chart-3: oklch(0.704 0.085 196.867);
  --chart-4: oklch(0.759 0.108 109.57);
  --chart-5: oklch(0.602 0.173 328.101);
}