Flawless for shadcn/ui

Flawless is a shadcn/ui theme built around a deep green primary color (#4f5427) with deep purple accents (#54274f). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#4f5427) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#ffffffwhite
#070703black
Foreground
#0f1104black
#ffffffwhite
Card
#fcfcfcsnow
#0a0a05black
Card foreground
#0c0c03black
#ffffffwhite
Popover
#ffffffwhite
#070703black
Popover foreground
#0f1104black
#ffffffwhite
Primary
#4f5427darkolivegreen
#4f5427darkolivegreen
Primary foreground
#e2e5c7gainsboro
#e2e5c7gainsboro
Secondary
#274f54darkslategray
#274f54darkslategray
Secondary foreground
#c7e2e5powderblue
#c7e2e5powderblue
Muted
#e7f2f4lavender
#0b1718black
Muted foreground
#51696cdimgray
#93abaedarkgray
Accent
#54274fdarkslategray
#54274fdarkslategray
Accent foreground
#e5c7e2thistle
#e5c7e2thistle
Destructive
#993000saddlebrown
#ff661ftomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4f5427darkolivegreen
#4f5427darkolivegreen

Contrast

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

Light mode
Text on background19.05:1AAA
Text on card19.21:1AAA
Primary button6.19:1AA
Secondary button6.59:1AA
Muted text5.14:1AA
Accent7.66:1AAA
Destructive7.54:1AAA
Dark mode
Text on background20.18:1AAA
Text on card19.80:1AAA
Primary button6.19:1AA
Secondary button6.59:1AA
Muted text7.53:1AAA
Accent7.66:1AAA
Destructive7.15:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.17 0.027 113.399);
  --muted: oklch(0.954 0.013 204.892);
  --muted-foreground: oklch(0.502 0.029 204.696);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.17 0.027 113.399);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.151 0.023 112.853);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.43 0.066 113.922);
  --primary-foreground: oklch(0.913 0.04 111.829);
  --secondary: oklch(0.401 0.046 204.941);
  --secondary-foreground: oklch(0.895 0.029 204.78);
  --accent: oklch(0.35 0.089 331.146);
  --accent-foreground: oklch(0.864 0.049 329.208);
  --destructive: oklch(0.463 0.148 39.195);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.43 0.066 113.922);
  --chart-1: oklch(0.43 0.066 113.922);
  --chart-2: oklch(0.401 0.046 204.941);
  --chart-3: oklch(0.35 0.089 331.146);
  --chart-4: oklch(0.435 0.051 204.962);
  --chart-5: oklch(0.436 0.071 114.089);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.012 111.978);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.195 0.017 204.722);
  --muted-foreground: oklch(0.725 0.027 204.76);
  --popover: oklch(0.126 0.012 111.978);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.144 0.014 112.001);
  --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.43 0.066 113.922);
  --primary-foreground: oklch(0.913 0.04 111.829);
  --secondary: oklch(0.401 0.046 204.941);
  --secondary-foreground: oklch(0.895 0.029 204.78);
  --accent: oklch(0.35 0.089 331.146);
  --accent-foreground: oklch(0.864 0.049 329.208);
  --destructive: oklch(0.696 0.201 41.115);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.43 0.066 113.922);
  --chart-1: oklch(0.43 0.066 113.922);
  --chart-2: oklch(0.401 0.046 204.941);
  --chart-3: oklch(0.35 0.089 331.146);
  --chart-4: oklch(0.435 0.051 204.962);
  --chart-5: oklch(0.436 0.071 114.089);
}