Cartridge for shadcn/ui

Cartridge is a shadcn/ui theme built around a vivid violet primary color (#8d04dc) with neutral gray accents (#d9d8d9). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid violet primary (#8d04dc) on a neutral background (#060208).

Color palette

TokenLightDark
Background
#fdfbfewhite
#060208black
Foreground
#0c0312black
#fdfcfdwhite
Card
#fdfbfewhite
#060208black
Card foreground
#0c0312black
#fdfcfdwhite
Popover
#fdfbfewhite
#060208black
Popover foreground
#0c0312black
#fdfcfdwhite
Primary
#8d04dcdarkviolet
#8d04dcdarkviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d9d8d9gainsboro
#151316black
Secondary foreground
#403f40darkslategray
#afa6b5darkgray
Muted
#e2dce5gainsboro
#201a23black
Muted foreground
#65526fdimgray
#a290addarkgray
Accent
#d9d8d9gainsboro
#151316black
Accent foreground
#403f40darkslategray
#afa6b5darkgray
Destructive
#c10b01firebrick
#fe180bred
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8d04dcdarkviolet
#8d04dcdarkviolet

Contrast

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

Light mode
Text on background19.65:1AAA
Text on card19.65:1AAA
Primary button6.59:1AA
Secondary button7.39:1AAA
Muted text5.20:1AA
Accent7.39:1AAA
Destructive6.34:1AA
Dark mode
Text on background20.08:1AAA
Text on card20.08:1AAA
Primary button6.59:1AA
Secondary button7.89:1AAA
Muted text5.78:1AA
Accent7.89:1AAA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 313.577);
  --foreground: oklch(0.127 0.041 313.991);
  --muted: oklch(0.901 0.014 313.511);
  --muted-foreground: oklch(0.469 0.051 312.932);
  --popover: oklch(0.99 0.005 313.577);
  --popover-foreground: oklch(0.127 0.041 313.991);
  --card: oklch(0.99 0.005 313.577);
  --card-foreground: oklch(0.127 0.041 313.991);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.514 0.265 305.216);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.884 0.001 313.598);
  --secondary-foreground: oklch(0.369 0.002 313.566);
  --accent: oklch(0.884 0.001 313.598);
  --accent-foreground: oklch(0.369 0.002 313.566);
  --destructive: oklch(0.512 0.206 29.739);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.514 0.265 305.216);
  --chart-1: oklch(0.514 0.265 305.216);
  --chart-2: oklch(0.884 0.001 313.598);
  --chart-3: oklch(0.884 0.001 313.598);
  --chart-4: oklch(0.907 0.001 313.6);
  --chart-5: oklch(0.517 0.269 304.83);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.021 315.307);
  --foreground: oklch(0.992 0.002 313.595);
  --muted: oklch(0.229 0.019 313.084);
  --muted-foreground: oklch(0.678 0.047 313.181);
  --popover: oklch(0.105 0.021 315.307);
  --popover-foreground: oklch(0.992 0.002 313.595);
  --card: oklch(0.105 0.021 315.307);
  --card-foreground: oklch(0.992 0.002 313.595);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.514 0.265 305.216);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.189 0.008 313.341);
  --secondary-foreground: oklch(0.738 0.023 313.412);
  --accent: oklch(0.189 0.008 313.341);
  --accent-foreground: oklch(0.738 0.023 313.412);
  --destructive: oklch(0.631 0.251 29.5);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.514 0.265 305.216);
  --chart-1: oklch(0.514 0.265 305.216);
  --chart-2: oklch(0.189 0.008 313.341);
  --chart-3: oklch(0.189 0.008 313.341);
  --chart-4: oklch(0.222 0.011 313.307);
  --chart-5: oklch(0.517 0.269 304.83);
}