Preoccupation for shadcn/ui

Preoccupation is a shadcn/ui theme built around a light orange primary color (#f2d3c0) with light violet accents (#d3c0f2). The light mode uses a neutral background (#ffffff). Dark mode keeps the light orange primary (#f2d3c0) on an orange-tinted background (#0e0906).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e0906black
Foreground
#040201black
#fdfcfcsnow
Card
#ffffffwhite
#0e0906black
Card foreground
#040201black
#fdfcfcsnow
Popover
#ffffffwhite
#0e0906black
Popover foreground
#040201black
#fdfcfcsnow
Primary
#f2d3c0peachpuff
#f2d3c0peachpuff
Primary foreground
#693616saddlebrown
#693616saddlebrown
Secondary
#c0f2d3powderblue
#c0f2d3powderblue
Secondary foreground
#04150bblack
#04150bblack
Muted
#cbe7d5gainsboro
#183423darkslategray
Muted foreground
#4e5651darkslategray
#a9b1acdarkgray
Accent
#d3c0f2thistle
#d3c0f2thistle
Accent foreground
#361669midnightblue
#361669midnightblue
Destructive
#6c2304maroon
#f5540forangered
Destructive foreground
#fbc0a7lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f2d3c0peachpuff
#f2d3c0peachpuff

Contrast

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

Light mode
Text on background20.70:1AAA
Text on card20.70:1AAA
Primary button6.93:1AA
Secondary button15.06:1AAA
Muted text5.73:1AA
Accent8.52:1AAA
Destructive7.01:1AAA
Dark mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button6.93:1AA
Secondary button15.06:1AAA
Muted text6.12:1AA
Accent8.52:1AAA
Destructive3.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.092 0.013 65.185);
  --muted: oklch(0.902 0.038 158.494);
  --muted-foreground: oklch(0.443 0.013 158.791);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.092 0.013 65.185);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.092 0.013 65.185);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.887 0.043 53.856);
  --primary-foreground: oklch(0.393 0.085 49.751);
  --secondary: oklch(0.917 0.066 157.753);
  --secondary-foreground: oklch(0.177 0.032 155.922);
  --accent: oklch(0.84 0.071 302.376);
  --accent-foreground: oklch(0.304 0.134 294.497);
  --destructive: oklch(0.365 0.11 39.938);
  --destructive-foreground: oklch(0.856 0.077 44.281);
  --ring: oklch(0.887 0.043 53.856);
  --chart-1: oklch(0.887 0.043 53.856);
  --chart-2: oklch(0.917 0.066 157.753);
  --chart-3: oklch(0.84 0.071 302.376);
  --chart-4: oklch(0.933 0.053 158.141);
  --chart-5: oklch(0.888 0.045 53.827);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.146 0.011 57.409);
  --foreground: oklch(0.992 0 54.501);
  --muted: oklch(0.298 0.047 155.167);
  --muted-foreground: oklch(0.754 0.012 159.124);
  --popover: oklch(0.146 0.011 57.409);
  --popover-foreground: oklch(0.992 0 54.501);
  --card: oklch(0.146 0.011 57.409);
  --card-foreground: oklch(0.992 0 54.501);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.887 0.043 53.856);
  --primary-foreground: oklch(0.393 0.085 49.751);
  --secondary: oklch(0.917 0.066 157.753);
  --secondary-foreground: oklch(0.177 0.032 155.922);
  --accent: oklch(0.84 0.071 302.376);
  --accent-foreground: oklch(0.304 0.134 294.497);
  --destructive: oklch(0.659 0.208 38.588);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.887 0.043 53.856);
  --chart-1: oklch(0.887 0.043 53.856);
  --chart-2: oklch(0.917 0.066 157.753);
  --chart-3: oklch(0.84 0.071 302.376);
  --chart-4: oklch(0.933 0.053 158.141);
  --chart-5: oklch(0.888 0.045 53.827);
}