Faint for shadcn/ui

Faint is a shadcn/ui theme built around a vivid purple primary color (#df80ff) with vivid teal accents (#80ffdf). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the vivid purple primary (#df80ff) on a purple-tinted background (#0a030c).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#0a030cblack
Foreground
#110415black
#fdfcfdwhite
Card
#fbf8fcghostwhite
#0a030cblack
Card foreground
#110415black
#fdfcfdwhite
Popover
#fbf8fcghostwhite
#0a030cblack
Popover foreground
#110415black
#fdfcfdwhite
Primary
#df80ffviolet
#df80ffviolet
Primary foreground
#39004dmidnightblue
#39004dmidnightblue
Secondary
#ffdf80khaki
#ffdf80khaki
Secondary foreground
#4d3900saddlebrown
#4d3900saddlebrown
Muted
#efece1beige
#1e1b10black
Muted foreground
#716a56dimgray
#a9a38erosybrown
Accent
#80ffdfaquamarine
#80ffdfaquamarine
Accent foreground
#004d39darkslategray
#004d39darkslategray
Destructive
#88390csaddlebrown
#ec6c22chocolate
Destructive foreground
#fbddcbbisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#df80ffviolet
#df80ffviolet

Contrast

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

Light mode
Text on background18.94:1AAA
Text on card18.94:1AAA
Primary button6.74:1AA
Secondary button8.48:1AAA
Muted text4.54:1AA
Accent8.14:1AAA
Destructive6.16:1AA
Dark mode
Text on background19.88:1AAA
Text on card19.88:1AAA
Primary button6.74:1AA
Secondary button8.48:1AAA
Muted text6.83:1AA
Accent8.14:1AAA
Destructive6.74:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.006 317.753);
  --foreground: oklch(0.144 0.042 317.856);
  --muted: oklch(0.942 0.015 91.544);
  --muted-foreground: oklch(0.526 0.033 91.792);
  --popover: oklch(0.982 0.006 317.753);
  --popover-foreground: oklch(0.144 0.042 317.856);
  --card: oklch(0.982 0.006 317.753);
  --card-foreground: oklch(0.144 0.042 317.856);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.749 0.198 317.135);
  --primary-foreground: oklch(0.259 0.128 314.86);
  --secondary: oklch(0.911 0.121 91.455);
  --secondary-foreground: oklch(0.357 0.073 87.605);
  --accent: oklch(0.918 0.123 174.915);
  --accent-foreground: oklch(0.372 0.074 169.076);
  --destructive: oklch(0.447 0.12 45.102);
  --destructive-foreground: oklch(0.917 0.041 52.011);
  --ring: oklch(0.749 0.198 317.135);
  --chart-1: oklch(0.749 0.198 317.135);
  --chart-2: oklch(0.911 0.121 91.455);
  --chart-3: oklch(0.918 0.123 174.915);
  --chart-4: oklch(0.921 0.108 91.646);
  --chart-5: oklch(0.749 0.204 317.103);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.028 319.425);
  --foreground: oklch(0.992 0.001 317.762);
  --muted: oklch(0.221 0.021 91.793);
  --muted-foreground: oklch(0.714 0.03 91.717);
  --popover: oklch(0.12 0.028 319.425);
  --popover-foreground: oklch(0.992 0.001 317.762);
  --card: oklch(0.12 0.028 319.425);
  --card-foreground: oklch(0.992 0.001 317.762);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.749 0.198 317.135);
  --primary-foreground: oklch(0.259 0.128 314.86);
  --secondary: oklch(0.911 0.121 91.455);
  --secondary-foreground: oklch(0.357 0.073 87.605);
  --accent: oklch(0.918 0.123 174.915);
  --accent-foreground: oklch(0.372 0.074 169.076);
  --destructive: oklch(0.677 0.177 45.723);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.749 0.198 317.135);
  --chart-1: oklch(0.749 0.198 317.135);
  --chart-2: oklch(0.911 0.121 91.455);
  --chart-3: oklch(0.918 0.123 174.915);
  --chart-4: oklch(0.921 0.108 91.646);
  --chart-5: oklch(0.749 0.204 317.103);
}