Resistance for shadcn/ui

Resistance is a shadcn/ui theme built around a vivid deep purple primary color (#76037c) with vivid deep green accents (#097c03). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep purple primary (#76037c) on a purple-tinted background (#0a050a).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a050ablack
Foreground
#160317black
#ffffffwhite
Card
#fcfcfcsnow
#0d070eblack
Card foreground
#110212black
#ffffffwhite
Popover
#ffffffwhite
#0a050ablack
Popover foreground
#160317black
#ffffffwhite
Primary
#76037cpurple
#76037cpurple
Primary foreground
#f9b4fdplum
#f9b4fdplum
Secondary
#097c03green
#097c03green
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e2e4e2gainsboro
#1b1d1bblack
Muted foreground
#4b644adarkolivegreen
#9db59bdarkseagreen
Accent
#097c03green
#097c03green
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d42111firebrick
#ec2a18orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#76037cpurple
#76037cpurple

Contrast

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

Light mode
Text on background19.82:1AAA
Text on card19.73:1AAA
Primary button6.23:1AA
Secondary button5.36:1AA
Muted text5.10:1AA
Accent5.36:1AA
Destructive5.19:1AA
Dark mode
Text on background20.20:1AAA
Text on card19.94:1AAA
Primary button6.23:1AA
Secondary button5.36:1AA
Muted text7.66:1AAA
Accent5.36:1AA
Destructive4.27:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.149 0.053 326.008);
  --muted: oklch(0.917 0.005 144.1);
  --muted-foreground: oklch(0.474 0.051 143.481);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.149 0.053 326.008);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.135 0.047 326.1);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.403 0.185 325.749);
  --primary-foreground: oklch(0.859 0.123 324.902);
  --secondary: oklch(0.51 0.171 142.259);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.51 0.171 142.259);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.559 0.213 30.089);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.403 0.185 325.749);
  --chart-1: oklch(0.403 0.185 325.749);
  --chart-2: oklch(0.51 0.171 142.259);
  --chart-3: oklch(0.51 0.171 142.259);
  --chart-4: oklch(0.553 0.186 142.289);
  --chart-5: oklch(0.407 0.188 325.732);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.017 325.164);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.229 0.007 143.958);
  --muted-foreground: oklch(0.748 0.046 143.765);
  --popover: oklch(0.127 0.017 325.164);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.141 0.02 324.994);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.403 0.185 325.749);
  --primary-foreground: oklch(0.859 0.123 324.902);
  --secondary: oklch(0.51 0.171 142.259);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.51 0.171 142.259);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.608 0.229 30.071);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.403 0.185 325.749);
  --chart-1: oklch(0.403 0.185 325.749);
  --chart-2: oklch(0.51 0.171 142.259);
  --chart-3: oklch(0.51 0.171 142.259);
  --chart-4: oklch(0.553 0.186 142.289);
  --chart-5: oklch(0.407 0.188 325.732);
}