Utility for shadcn/ui

Utility is a shadcn/ui theme built around a deep teal primary color (#2c5851) with deep yellow accents (#58512c). The light mode uses a neutral background (#f8fcfb). Dark mode keeps the deep teal primary (#2c5851) on a neutral background (#030707).

Color palette

TokenLightDark
Background
#f8fcfbmintcream
#030707black
Foreground
#010404black
#ffffffwhite
Card
#f8fcfbmintcream
#030707black
Card foreground
#010404black
#ffffffwhite
Popover
#f8fcfbmintcream
#030707black
Popover foreground
#010404black
#ffffffwhite
Primary
#2c5851darkslategray
#2c5851darkslategray
Primary foreground
#d0e7e3gainsboro
#d0e7e3gainsboro
Secondary
#512c58darkslategray
#512c58darkslategray
Secondary foreground
#e3d0e7gainsboro
#e3d0e7gainsboro
Muted
#f0e8f2lavender
#150d17black
Muted foreground
#6b586fdimgray
#a490a7darkgray
Accent
#58512cdarkolivegreen
#58512cdarkolivegreen
Accent foreground
#e7e3d0gainsboro
#e7e3d0gainsboro
Destructive
#720b04maroon
#e41607red
Destructive foreground
#fcb0ablightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c5851darkslategray
#2c5851darkslategray

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button6.16:1AA
Secondary button7.77:1AAA
Muted text5.40:1AA
Accent6.20:1AA
Destructive6.77:1AA
Dark mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button6.16:1AA
Secondary button7.77:1AAA
Muted text6.47:1AA
Accent6.20:1AA
Destructive4.77:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 185.33);
  --foreground: oklch(0.1 0.013 185.085);
  --muted: oklch(0.941 0.016 320.558);
  --muted-foreground: oklch(0.487 0.045 320.665);
  --popover: oklch(0.988 0.005 185.33);
  --popover-foreground: oklch(0.1 0.013 185.085);
  --card: oklch(0.988 0.005 185.33);
  --card-foreground: oklch(0.1 0.013 185.085);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.427 0.05 181.751);
  --primary-foreground: oklch(0.91 0.025 184.705);
  --secondary: oklch(0.36 0.085 320.76);
  --secondary-foreground: oklch(0.879 0.038 320.598);
  --accent: oklch(0.432 0.055 98.293);
  --accent-foreground: oklch(0.914 0.026 97.627);
  --destructive: oklch(0.353 0.136 30.089);
  --destructive-foreground: oklch(0.829 0.09 23.742);
  --ring: oklch(0.427 0.05 181.751);
  --chart-1: oklch(0.427 0.05 181.751);
  --chart-2: oklch(0.36 0.085 320.76);
  --chart-3: oklch(0.432 0.055 98.293);
  --chart-4: oklch(0.387 0.093 320.759);
  --chart-5: oklch(0.432 0.054 181.442);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.011 185.181);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.175 0.024 320.717);
  --muted-foreground: oklch(0.678 0.041 320.623);
  --popover: oklch(0.123 0.011 185.181);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.011 185.181);
  --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.427 0.05 181.751);
  --primary-foreground: oklch(0.91 0.025 184.705);
  --secondary: oklch(0.36 0.085 320.76);
  --secondary-foreground: oklch(0.879 0.038 320.598);
  --accent: oklch(0.432 0.055 98.293);
  --accent-foreground: oklch(0.914 0.026 97.627);
  --destructive: oklch(0.582 0.231 29.761);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.427 0.05 181.751);
  --chart-1: oklch(0.427 0.05 181.751);
  --chart-2: oklch(0.36 0.085 320.76);
  --chart-3: oklch(0.432 0.055 98.293);
  --chart-4: oklch(0.387 0.093 320.759);
  --chart-5: oklch(0.432 0.054 181.442);
}