Oil for shadcn/ui

Oil is a shadcn/ui theme built around a muted deep green primary color (#25372b) with muted deep teal accents (#253735). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#25372b) on a green-tinted background (#041009).

Color palette

TokenLightDark
Background
#ffffffwhite
#041009black
Foreground
#010402black
#ffffffwhite
Card
#ffffffwhite
#041009black
Card foreground
#010402black
#ffffffwhite
Popover
#ffffffwhite
#041009black
Popover foreground
#010402black
#ffffffwhite
Primary
#25372bdarkslategray
#25372bdarkslategray
Primary foreground
#bcd2c4silver
#bcd2c4silver
Secondary
#273725darkslategray
#273725darkslategray
Secondary foreground
#bfd2bcsilver
#bfd2bcsilver
Muted
#d5e9d2gainsboro
#192d16black
Muted foreground
#505350darkslategray
#acafacdarkgray
Accent
#253735darkslategray
#253735darkslategray
Accent foreground
#bcd2cflightgrey
#bcd2cflightgrey
Destructive
#a23e10saddlebrown
#e35716chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#25372bdarkslategray
#25372bdarkslategray

Contrast

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

Light mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button7.91:1AAA
Secondary button7.92:1AAA
Muted text6.11:1AA
Accent7.90:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.37:1AAA
Text on card19.37:1AAA
Primary button7.91:1AAA
Secondary button7.92:1AAA
Muted text6.66:1AA
Accent7.90:1AAA
Destructive3.70:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.098 0.015 158.476);
  --muted: oklch(0.914 0.038 141.476);
  --muted-foreground: oklch(0.439 0.006 141.551);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.098 0.015 158.476);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.098 0.015 158.476);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.317 0.032 156.323);
  --primary-foreground: oklch(0.843 0.031 157.898);
  --secondary: oklch(0.317 0.038 141.261);
  --secondary-foreground: oklch(0.843 0.037 141.468);
  --accent: oklch(0.32 0.024 185.759);
  --accent-foreground: oklch(0.847 0.024 187.027);
  --destructive: oklch(0.498 0.143 41.231);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.317 0.032 156.323);
  --chart-1: oklch(0.317 0.032 156.323);
  --chart-2: oklch(0.317 0.038 141.261);
  --chart-3: oklch(0.32 0.024 185.759);
  --chart-4: oklch(0.35 0.043 141.252);
  --chart-5: oklch(0.32 0.036 155.963);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.025 157.007);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.272 0.049 141.132);
  --muted-foreground: oklch(0.751 0.006 141.571);
  --popover: oklch(0.158 0.025 157.007);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.158 0.025 157.007);
  --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.317 0.032 156.323);
  --primary-foreground: oklch(0.843 0.031 157.898);
  --secondary: oklch(0.317 0.038 141.261);
  --secondary-foreground: oklch(0.843 0.037 141.468);
  --accent: oklch(0.32 0.024 185.759);
  --accent-foreground: oklch(0.847 0.024 187.027);
  --destructive: oklch(0.635 0.187 40.736);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.317 0.032 156.323);
  --chart-1: oklch(0.317 0.032 156.323);
  --chart-2: oklch(0.317 0.038 141.261);
  --chart-3: oklch(0.32 0.024 185.759);
  --chart-4: oklch(0.35 0.043 141.252);
  --chart-5: oklch(0.32 0.036 155.963);
}