Oil for shadcn/ui

Oil is a shadcn/ui theme built around a light purple primary color (#ddbbda) with light pink accents (#ddbbc9). The light mode uses a neutral background (#fefbfe). Dark mode keeps the light purple primary (#ddbbda) on a purple-tinted background (#0c040b).

Color palette

TokenLightDark
Background
#fefbfewhite
#0c040bblack
Foreground
#090208black
#fdfcfdwhite
Card
#fcf7fcsnow
#10050fblack
Card foreground
#040104black
#ffffffwhite
Popover
#fefbfewhite
#0c040bblack
Popover foreground
#090208black
#fdfcfdwhite
Primary
#ddbbdathistle
#ddbbdathistle
Primary foreground
#442241darkslategray
#442241darkslategray
Secondary
#cfbbddthistle
#cfbbddthistle
Secondary foreground
#362244darkslategray
#362244darkslategray
Muted
#f0eff0whitesmoke
#0f0f10black
Muted foreground
#56495fdimgray
#ada0b6darkgray
Accent
#ddbbc9thistle
#ddbbc9thistle
Accent foreground
#442230darkslategray
#442230darkslategray
Destructive
#6e200cmaroon
#e14119orangered
Destructive foreground
#f7c3b6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ddbbdathistle
#ddbbdathistle

Contrast

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

Light mode
Text on background19.97:1AAA
Text on card19.68:1AAA
Primary button7.85:1AAA
Secondary button8.01:1AAA
Muted text7.28:1AAA
Accent7.91:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.81:1AAA
Text on card20.02:1AAA
Primary button7.85:1AAA
Secondary button8.01:1AAA
Muted text7.74:1AAA
Accent7.91:1AAA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 328.107);
  --foreground: oklch(0.107 0.03 329.641);
  --muted: oklch(0.953 0.002 311.705);
  --muted-foreground: oklch(0.427 0.039 310.99);
  --popover: oklch(0.991 0.004 328.107);
  --popover-foreground: oklch(0.107 0.03 329.641);
  --card: oklch(0.982 0.008 328.151);
  --card-foreground: oklch(0.085 0.023 329.641);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.831 0.058 328.767);
  --primary-foreground: oklch(0.311 0.072 330.25);
  --secondary: oklch(0.819 0.053 311.208);
  --secondary-foreground: oklch(0.293 0.066 309.776);
  --accent: oklch(0.825 0.044 351.109);
  --accent-foreground: oklch(0.303 0.057 354.607);
  --destructive: oklch(0.365 0.115 34.759);
  --destructive-foreground: oklch(0.859 0.063 34.407);
  --ring: oklch(0.831 0.058 328.767);
  --chart-1: oklch(0.831 0.058 328.767);
  --chart-2: oklch(0.819 0.053 311.208);
  --chart-3: oklch(0.825 0.044 351.109);
  --chart-4: oklch(0.846 0.044 311.303);
  --chart-5: oklch(0.83 0.063 328.828);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.026 329.476);
  --foreground: oklch(0.992 0.003 328.094);
  --muted: oklch(0.168 0.003 311.558);
  --muted-foreground: oklch(0.723 0.034 311.344);
  --popover: oklch(0.125 0.026 329.476);
  --popover-foreground: oklch(0.992 0.003 328.094);
  --card: oklch(0.139 0.03 329.85);
  --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.831 0.058 328.767);
  --primary-foreground: oklch(0.311 0.072 330.25);
  --secondary: oklch(0.819 0.053 311.208);
  --secondary-foreground: oklch(0.293 0.066 309.776);
  --accent: oklch(0.825 0.044 351.109);
  --accent-foreground: oklch(0.303 0.057 354.607);
  --destructive: oklch(0.606 0.203 34.292);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.831 0.058 328.767);
  --chart-1: oklch(0.831 0.058 328.767);
  --chart-2: oklch(0.819 0.053 311.208);
  --chart-3: oklch(0.825 0.044 351.109);
  --chart-4: oklch(0.846 0.044 311.303);
  --chart-5: oklch(0.83 0.063 328.828);
}