Torn for shadcn/ui

Torn is a shadcn/ui theme built around a vivid deep violet primary color (#0c0028) with neutral gray accents (#e5e5e6). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep violet primary (#0c0028) on a violet-tinted background (#06040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#06040bblack
Foreground
#030109black
#faf9fbghostwhite
Card
#fcfcfcsnow
#08050fblack
Card foreground
#020105black
#fcfcfdwhite
Popover
#ffffffwhite
#06040bblack
Popover foreground
#030109black
#faf9fbghostwhite
Primary
#0c0028black
#0c0028black
Primary foreground
#d3c2fethistle
#d3c2fethistle
Secondary
#e5e5e6gainsboro
#222028black
Secondary foreground
#4c4c4ddarkslategray
#bab5c4silver
Muted
#dddbe1gainsboro
#201e24black
Muted foreground
#514b63dimgray
#a39cb4darkgray
Accent
#e5e5e6gainsboro
#222028black
Accent foreground
#4c4c4ddarkslategray
#bab5c4silver
Destructive
#82190dmaroon
#df2a16crimson
Destructive foreground
#f9ccc7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c0028black
#0c0028black

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.36:1AAA
Primary button12.32:1AAA
Secondary button6.82:1AA
Muted text6.03:1AA
Accent6.82:1AA
Destructive6.93:1AA
Dark mode
Text on background19.42:1AAA
Text on card19.68:1AAA
Primary button12.32:1AAA
Secondary button8.05:1AAA
Muted text6.24:1AA
Accent8.05:1AAA
Destructive4.69:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.09 0.032 299.38);
  --muted: oklch(0.895 0.007 299.163);
  --muted-foreground: oklch(0.428 0.04 297.65);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.09 0.032 299.38);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.072 0.025 299.38);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.145 0.08 288.777);
  --primary-foreground: oklch(0.849 0.084 297.569);
  --secondary: oklch(0.923 0.001 299.291);
  --secondary-foreground: oklch(0.417 0.003 299.199);
  --accent: oklch(0.923 0.001 299.291);
  --accent-foreground: oklch(0.417 0.003 299.199);
  --destructive: oklch(0.396 0.142 30.474);
  --destructive-foreground: oklch(0.884 0.052 25.576);
  --ring: oklch(0.145 0.08 288.777);
  --chart-1: oklch(0.145 0.08 288.777);
  --chart-2: oklch(0.923 0.001 299.291);
  --chart-3: oklch(0.923 0.001 299.291);
  --chart-4: oklch(0.946 0 299.295);
  --chart-5: oklch(0.143 0.083 288.371);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.021 299.245);
  --foreground: oklch(0.984 0.002 299.275);
  --muted: oklch(0.241 0.01 298.574);
  --muted-foreground: oklch(0.707 0.036 298.432);
  --popover: oklch(0.116 0.021 299.245);
  --popover-foreground: oklch(0.984 0.002 299.275);
  --card: oklch(0.129 0.024 298.231);
  --card-foreground: oklch(0.992 0.001 299.29);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.145 0.08 288.777);
  --primary-foreground: oklch(0.849 0.084 297.569);
  --secondary: oklch(0.248 0.015 298.259);
  --secondary-foreground: oklch(0.782 0.021 298.845);
  --accent: oklch(0.248 0.015 298.259);
  --accent-foreground: oklch(0.782 0.021 298.845);
  --destructive: oklch(0.584 0.217 30.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.145 0.08 288.777);
  --chart-1: oklch(0.145 0.08 288.777);
  --chart-2: oklch(0.248 0.015 298.259);
  --chart-3: oklch(0.248 0.015 298.259);
  --chart-4: oklch(0.278 0.018 298.2);
  --chart-5: oklch(0.143 0.083 288.371);
}