Flawless for shadcn/ui

Flawless is a shadcn/ui theme built around a violet primary color (#8c63ca) with green accents (#a1ca63). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#8c63ca) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#fcfbfewhite
#020104black
Foreground
#050208black
#fcfbfdsnow
Card
#fcfbfewhite
#020104black
Card foreground
#050208black
#fcfbfdsnow
Popover
#fcfbfewhite
#020104black
Popover foreground
#050208black
#fcfbfdsnow
Primary
#8c63camediumpurple
#8c63camediumpurple
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#a1ca63darkkhaki
#a1ca63darkkhaki
Secondary foreground
#000000black
#000000black
Muted
#dce8c9gainsboro
#293617darkslategray
Muted foreground
#555752dimgray
#abada8darkgray
Accent
#a1ca63darkkhaki
#a1ca63darkkhaki
Accent foreground
#000000black
#000000black
Destructive
#db4900orangered
#f55200orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8c63camediumpurple
#8c63camediumpurple

Contrast

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

Light mode
Text on background20.03:1AAA
Text on card20.03:1AAA
Primary button4.41:1AA Large
Secondary button11.10:1AAA
Muted text5.72:1AA
Accent11.10:1AAA
Destructive4.21:1AA Large
Dark mode
Text on background20.15:1AAA
Text on card20.15:1AAA
Primary button4.41:1AA Large
Secondary button11.10:1AAA
Muted text5.69:1AA
Accent11.10:1AAA
Destructive3.45:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 304.299);
  --foreground: oklch(0.101 0.021 305.356);
  --muted: oklch(0.914 0.043 125.026);
  --muted-foreground: oklch(0.452 0.008 124.614);
  --popover: oklch(0.99 0.003 304.299);
  --popover-foreground: oklch(0.101 0.021 305.356);
  --card: oklch(0.99 0.003 304.299);
  --card-foreground: oklch(0.101 0.021 305.356);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.589 0.155 300.162);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.786 0.139 127.327);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.786 0.139 127.327);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.605 0.193 39.152);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.589 0.155 300.162);
  --chart-1: oklch(0.589 0.155 300.162);
  --chart-2: oklch(0.786 0.139 127.327);
  --chart-3: oklch(0.786 0.139 127.327);
  --chart-4: oklch(0.801 0.13 127.003);
  --chart-5: oklch(0.585 0.163 299.827);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.081 0.016 305.309);
  --foreground: oklch(0.991 0.003 304.305);
  --muted: oklch(0.311 0.053 127.156);
  --muted-foreground: oklch(0.746 0.007 124.489);
  --popover: oklch(0.081 0.016 305.309);
  --popover-foreground: oklch(0.991 0.003 304.305);
  --card: oklch(0.081 0.016 305.309);
  --card-foreground: oklch(0.991 0.003 304.305);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.589 0.155 300.162);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.786 0.139 127.327);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.786 0.139 127.327);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.656 0.211 38.892);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.589 0.155 300.162);
  --chart-1: oklch(0.589 0.155 300.162);
  --chart-2: oklch(0.786 0.139 127.327);
  --chart-3: oklch(0.786 0.139 127.327);
  --chart-4: oklch(0.801 0.13 127.003);
  --chart-5: oklch(0.585 0.163 299.827);
}