Chauvinist for shadcn/ui

Chauvinist is a shadcn/ui theme built around a near-black primary color (#010104) with near-black accents (#020104). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#010104) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#ffffffwhite
#020203black
Foreground
#060714black
#fcfcfdwhite
Card
#ffffffwhite
#020203black
Card foreground
#060714black
#fcfcfdwhite
Popover
#ffffffwhite
#020203black
Popover foreground
#060714black
#fcfcfdwhite
Primary
#010104black
#010104black
Primary foreground
#acb2f1lightsteelblue
#acb2f1lightsteelblue
Secondary
#010304black
#010304black
Secondary foreground
#55a7e2cornflowerblue
#55a7e2cornflowerblue
Muted
#e8eef2lavender
#0d1317black
Muted foreground
#545d63dimgray
#9ca4abdarkgray
Accent
#020104black
#020104black
Accent foreground
#c9acf1plum
#c9acf1plum
Destructive
#8b3209saddlebrown
#e1510echocolate
Destructive foreground
#fcdacabisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010104black
#010104black

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 button10.31:1AAA
Secondary button7.89:1AAA
Muted text5.74:1AA
Accent10.56:1AAA
Destructive6.25:1AA
Dark mode
Text on background20.23:1AAA
Text on card20.23:1AAA
Primary button10.31:1AAA
Secondary button7.89:1AAA
Muted text7.42:1AAA
Accent10.56:1AAA
Destructive3.88:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.135 0.029 276.753);
  --muted: oklch(0.946 0.008 238.484);
  --muted-foreground: oklch(0.473 0.015 238.812);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.135 0.029 276.753);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.135 0.029 276.753);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.073 0.02 273.583);
  --primary-foreground: oklch(0.781 0.09 280.067);
  --secondary: oklch(0.091 0.012 229.386);
  --secondary-foreground: oklch(0.702 0.118 242.148);
  --accent: oklch(0.076 0.023 306.656);
  --accent-foreground: oklch(0.794 0.1 303.272);
  --destructive: oklch(0.441 0.13 40.7);
  --destructive-foreground: oklch(0.912 0.043 46.382);
  --ring: oklch(0.073 0.02 273.583);
  --chart-1: oklch(0.073 0.02 273.583);
  --chart-2: oklch(0.091 0.012 229.386);
  --chart-3: oklch(0.076 0.023 306.656);
  --chart-4: oklch(0.145 0.021 234.773);
  --chart-5: oklch(0.072 0.021 272.882);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.008 279.609);
  --foreground: oklch(0.992 0.001 282.202);
  --muted: oklch(0.181 0.012 239.404);
  --muted-foreground: oklch(0.715 0.013 238.627);
  --popover: oklch(0.085 0.008 279.609);
  --popover-foreground: oklch(0.992 0.001 282.202);
  --card: oklch(0.085 0.008 279.609);
  --card-foreground: oklch(0.992 0.001 282.202);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.073 0.02 273.583);
  --primary-foreground: oklch(0.781 0.09 280.067);
  --secondary: oklch(0.091 0.012 229.386);
  --secondary-foreground: oklch(0.702 0.118 242.148);
  --accent: oklch(0.076 0.023 306.656);
  --accent-foreground: oklch(0.794 0.1 303.272);
  --destructive: oklch(0.624 0.191 39.82);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.073 0.02 273.583);
  --chart-1: oklch(0.073 0.02 273.583);
  --chart-2: oklch(0.091 0.012 229.386);
  --chart-3: oklch(0.076 0.023 306.656);
  --chart-4: oklch(0.145 0.021 234.773);
  --chart-5: oklch(0.072 0.021 272.882);
}