Faint for shadcn/ui

Faint is a shadcn/ui theme built around a near-black primary color (#050505) with near-black accents (#050505). The light mode uses a neutral background (#fcf8f8). Dark mode keeps the near-black primary (#050505) on a red-tinted background (#0e0606).

Color palette

TokenLightDark
Background
#fcf8f8snow
#0e0606black
Foreground
#170303black
#faf5f5whitesmoke
Card
#fcf8f8snow
#0e0606black
Card foreground
#170303black
#faf5f5whitesmoke
Popover
#fcf8f8snow
#0e0606black
Popover foreground
#170303black
#faf5f5whitesmoke
Primary
#050505black
#050505black
Primary foreground
#9e9e9edarkgray
#9e9e9edarkgray
Secondary
#050505black
#050505black
Secondary foreground
#9e9e9edarkgray
#9e9e9edarkgray
Muted
#e4d7d7gainsboro
#281b1bblack
Muted foreground
#4c3838darkslategray
#c7b3b3silver
Accent
#050505black
#050505black
Accent foreground
#9e9e9edarkgray
#9e9e9edarkgray
Destructive
#8b2c04saddlebrown
#ea4a06orangered
Destructive foreground
#fdd5c3peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#050505black
#050505black

Contrast

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

Light mode
Text on background18.91:1AAA
Text on card18.91:1AAA
Primary button7.60:1AAA
Secondary button7.60:1AAA
Muted text7.79:1AAA
Accent7.60:1AAA
Destructive6.27:1AA
Dark mode
Text on background18.55:1AAA
Text on card18.55:1AAA
Primary button7.60:1AAA
Secondary button7.60:1AAA
Muted text8.37:1AAA
Accent7.60:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 17.242);
  --foreground: oklch(0.14 0.04 23.913);
  --muted: oklch(0.89 0.015 17.432);
  --muted-foreground: oklch(0.364 0.028 18.545);
  --popover: oklch(0.981 0.005 17.242);
  --popover-foreground: oklch(0.14 0.04 23.913);
  --card: oklch(0.981 0.005 17.242);
  --card-foreground: oklch(0.14 0.04 23.913);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.116 0 180);
  --primary-foreground: oklch(0.7 0 180);
  --secondary: oklch(0.116 0 180);
  --secondary-foreground: oklch(0.7 0 180);
  --accent: oklch(0.116 0 180);
  --accent-foreground: oklch(0.7 0 180);
  --destructive: oklch(0.433 0.136 38.892);
  --destructive-foreground: oklch(0.902 0.052 44.495);
  --ring: oklch(0.116 0 180);
  --chart-1: oklch(0.116 0 180);
  --chart-2: oklch(0.116 0 180);
  --chart-3: oklch(0.116 0 180);
  --chart-4: oklch(0.158 0 169.695);
  --chart-5: oklch(0.115 0.001 17.277);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.017 19.445);
  --foreground: oklch(0.974 0.005 17.25);
  --muted: oklch(0.237 0.021 18.77);
  --muted-foreground: oklch(0.783 0.023 17.651);
  --popover: oklch(0.136 0.017 19.445);
  --popover-foreground: oklch(0.974 0.005 17.25);
  --card: oklch(0.136 0.017 19.445);
  --card-foreground: oklch(0.974 0.005 17.25);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.116 0 180);
  --primary-foreground: oklch(0.7 0 180);
  --secondary: oklch(0.116 0 180);
  --secondary-foreground: oklch(0.7 0 180);
  --accent: oklch(0.116 0 180);
  --accent-foreground: oklch(0.7 0 180);
  --destructive: oklch(0.63 0.205 37.678);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.116 0 180);
  --chart-1: oklch(0.116 0 180);
  --chart-2: oklch(0.116 0 180);
  --chart-3: oklch(0.116 0 180);
  --chart-4: oklch(0.158 0 169.695);
  --chart-5: oklch(0.115 0.001 17.277);
}