Valance for shadcn/ui

Valance is a shadcn/ui theme built around a muted deep teal primary color (#141a1a) with muted deep red accents (#1a1414). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep teal primary (#141a1a) on a neutral background (#030807).

Color palette

TokenLightDark
Background
#ffffffwhite
#030807black
Foreground
#04100fblack
#f8fbfbghostwhite
Card
#fcfcfcsnow
#040b0bblack
Card foreground
#030c0cblack
#fcfdfdwhite
Popover
#ffffffwhite
#030807black
Popover foreground
#04100fblack
#f8fbfbghostwhite
Primary
#141a1ablack
#141a1ablack
Primary foreground
#a4bcbadarkgray
#a4bcbadarkgray
Secondary
#1a1414black
#1a1414black
Secondary foreground
#bca4a6darkgray
#bca4a6darkgray
Muted
#e2d0d1lightgrey
#2f1d1fblack
Muted foreground
#463e3fdarkslategray
#c1b9b9silver
Accent
#1a1414black
#1a1414black
Accent foreground
#bca4a6darkgray
#bca4a6darkgray
Destructive
#a9320afirebrick
#de410dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#141a1ablack
#141a1ablack

Contrast

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

Light mode
Text on background19.33:1AAA
Text on card19.35:1AAA
Primary button8.77:1AAA
Secondary button7.81:1AAA
Muted text6.99:1AA
Accent7.81:1AAA
Destructive6.70:1AA
Dark mode
Text on background19.41:1AAA
Text on card19.45:1AAA
Primary button8.77:1AAA
Secondary button7.81:1AAA
Muted text8.27:1AAA
Accent7.81:1AAA
Destructive4.32:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.162 0.02 189.06);
  --muted: oklch(0.872 0.021 11.766);
  --muted-foreground: oklch(0.373 0.011 11.898);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.162 0.02 189.06);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.145 0.017 189.812);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.212 0.01 190.172);
  --primary-foreground: oklch(0.776 0.026 190.509);
  --secondary: oklch(0.198 0.011 12.518);
  --secondary-foreground: oklch(0.74 0.028 12.076);
  --accent: oklch(0.198 0.011 12.518);
  --accent-foreground: oklch(0.74 0.028 12.076);
  --destructive: oklch(0.492 0.162 36.216);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.212 0.01 190.172);
  --chart-1: oklch(0.212 0.01 190.172);
  --chart-2: oklch(0.198 0.011 12.518);
  --chart-3: oklch(0.198 0.011 12.518);
  --chart-4: oklch(0.229 0.015 12.663);
  --chart-5: oklch(0.214 0.012 189.975);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.124 0.012 190.454);
  --foreground: oklch(0.987 0.003 191.182);
  --muted: oklch(0.255 0.029 13.831);
  --muted-foreground: oklch(0.792 0.009 11.5);
  --popover: oklch(0.124 0.012 190.454);
  --popover-foreground: oklch(0.987 0.003 191.182);
  --card: oklch(0.142 0.014 190.16);
  --card-foreground: oklch(0.993 0.002 191.216);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.212 0.01 190.172);
  --primary-foreground: oklch(0.776 0.026 190.509);
  --secondary: oklch(0.198 0.011 12.518);
  --secondary-foreground: oklch(0.74 0.028 12.076);
  --accent: oklch(0.198 0.011 12.518);
  --accent-foreground: oklch(0.74 0.028 12.076);
  --destructive: oklch(0.6 0.201 35.866);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.212 0.01 190.172);
  --chart-1: oklch(0.212 0.01 190.172);
  --chart-2: oklch(0.198 0.011 12.518);
  --chart-3: oklch(0.198 0.011 12.518);
  --chart-4: oklch(0.229 0.015 12.663);
  --chart-5: oklch(0.214 0.012 189.975);
}