Fortune for shadcn/ui

Fortune is a shadcn/ui theme built around a muted deep violet primary color (#110d17) with muted deep green accents (#0d1711). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#110d17) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#ffffffwhite
#050307black
Foreground
#020104black
#faf8fcghostwhite
Card
#fcfcfcsnow
#07050ablack
Card foreground
#000000black
#fcfcfdwhite
Popover
#fcfcfcsnow
#07050ablack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#110d17black
#110d17black
Primary foreground
#a693c2darkgray
#a693c2darkgray
Secondary
#17110dblack
#17110dblack
Secondary foreground
#c2a693tan
#c2a693tan
Muted
#e5e0dcgainsboro
#231e1ablack
Muted foreground
#58504bdarkolivegreen
#b4aca7darkgray
Accent
#0d1711black
#0d1711black
Accent foreground
#93c2a6darkseagreen
#93c2a6darkseagreen
Destructive
#d42b11firebrick
#ef5139tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#110d17black
#110d17black

Contrast

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

Light mode
Text on background20.81:1AAA
Text on card20.54:1AAA
Primary button6.93:1AA
Secondary button8.17:1AAA
Muted text5.99:1AA
Accent9.16:1AAA
Destructive5.04:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.77:1AAA
Primary button6.93:1AA
Secondary button8.17:1AAA
Muted text7.40:1AAA
Accent9.16:1AAA
Destructive3.55:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.081 0.015 305.262);
  --muted: oklch(0.908 0.007 56.323);
  --muted-foreground: oklch(0.438 0.013 56.013);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.169 0.021 302.498);
  --primary-foreground: oklch(0.697 0.071 302.876);
  --secondary: oklch(0.183 0.013 55.454);
  --secondary-foreground: oklch(0.745 0.043 55.644);
  --accent: oklch(0.192 0.019 157.689);
  --accent-foreground: oklch(0.774 0.064 158.166);
  --destructive: oklch(0.565 0.207 31.478);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.169 0.021 302.498);
  --chart-1: oklch(0.169 0.021 302.498);
  --chart-2: oklch(0.183 0.013 55.454);
  --chart-3: oklch(0.192 0.019 157.689);
  --chart-4: oklch(0.218 0.018 55.293);
  --chart-5: oklch(0.167 0.024 302.273);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.012 304.902);
  --foreground: oklch(0.982 0.005 304.277);
  --muted: oklch(0.239 0.01 55.842);
  --muted-foreground: oklch(0.75 0.012 56.218);
  --popover: oklch(0.123 0.014 304.902);
  --popover-foreground: oklch(0.991 0.002 304.311);
  --card: oklch(0.123 0.014 304.902);
  --card-foreground: oklch(0.991 0.002 304.311);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.169 0.021 302.498);
  --primary-foreground: oklch(0.697 0.071 302.876);
  --secondary: oklch(0.183 0.013 55.454);
  --secondary-foreground: oklch(0.745 0.043 55.644);
  --accent: oklch(0.192 0.019 157.689);
  --accent-foreground: oklch(0.774 0.064 158.166);
  --destructive: oklch(0.649 0.198 31.48);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.169 0.021 302.498);
  --chart-1: oklch(0.169 0.021 302.498);
  --chart-2: oklch(0.183 0.013 55.454);
  --chart-3: oklch(0.192 0.019 157.689);
  --chart-4: oklch(0.218 0.018 55.293);
  --chart-5: oklch(0.167 0.024 302.273);
}