Preoccupation for shadcn/ui

Preoccupation is a shadcn/ui theme built around a yellow primary color (#a69659) with blue accents (#5969a6). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#a69659) on a yellow-tinted background (#0f0d06).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f0d06black
Foreground
#151204black
#ffffffwhite
Card
#fcfcfcsnow
#131007black
Card foreground
#110e03black
#ffffffwhite
Popover
#fcfcfcsnow
#131007black
Popover foreground
#110e03black
#ffffffwhite
Primary
#a69659darkkhaki
#a69659darkkhaki
Primary foreground
#000000black
#000000black
Secondary
#5969a6steelblue
#5969a6steelblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efeff0whitesmoke
#0f0f10black
Muted foreground
#595d6edimgray
#9195a6darkgray
Accent
#5969a6steelblue
#5969a6steelblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#790b01maroon
#e81602red
Destructive foreground
#feb5aelightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a69659darkkhaki
#a69659darkkhaki

Contrast

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

Light mode
Text on background18.74:1AAA
Text on card18.88:1AAA
Primary button7.15:1AAA
Secondary button5.27:1AA
Muted text5.69:1AA
Accent5.27:1AA
Destructive6.66:1AA
Dark mode
Text on background19.44:1AAA
Text on card18.99:1AAA
Primary button7.15:1AAA
Secondary button5.27:1AA
Muted text6.44:1AA
Accent5.27:1AA
Destructive4.61:1AA

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.181 0.027 96.811);
  --muted: oklch(0.953 0.002 275.013);
  --muted-foreground: oklch(0.481 0.029 274.221);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.165 0.024 97.719);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.165 0.024 97.719);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.674 0.083 95.752);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.534 0.098 272.075);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.534 0.098 272.075);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.368 0.143 30.687);
  --destructive-foreground: oklch(0.84 0.087 24.886);
  --ring: oklch(0.674 0.083 95.752);
  --chart-1: oklch(0.674 0.083 95.752);
  --chart-2: oklch(0.534 0.098 272.075);
  --chart-3: oklch(0.534 0.098 272.075);
  --chart-4: oklch(0.563 0.091 272.49);
  --chart-5: oklch(0.682 0.09 95.701);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.016 96.964);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.168 0.003 274.843);
  --muted-foreground: oklch(0.672 0.026 274.522);
  --popover: oklch(0.174 0.019 96.225);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.174 0.019 96.225);
  --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.674 0.083 95.752);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.534 0.098 272.075);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.534 0.098 272.075);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.59 0.235 30.04);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.674 0.083 95.752);
  --chart-1: oklch(0.674 0.083 95.752);
  --chart-2: oklch(0.534 0.098 272.075);
  --chart-3: oklch(0.534 0.098 272.075);
  --chart-4: oklch(0.563 0.091 272.49);
  --chart-5: oklch(0.682 0.09 95.701);
}