Oval for shadcn/ui

Oval is a shadcn/ui theme built around a muted deep blue primary color (#2e383d) with muted deep green accents (#383d2e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#2e383d) on a blue-tinted background (#070b0e).

Color palette

TokenLightDark
Background
#ffffffwhite
#070b0eblack
Foreground
#040f15black
#ffffffwhite
Card
#ffffffwhite
#070b0eblack
Card foreground
#040f15black
#ffffffwhite
Popover
#ffffffwhite
#070b0eblack
Popover foreground
#040f15black
#ffffffwhite
Primary
#2e383ddarkslategray
#2e383ddarkslategray
Primary foreground
#c8d1d5lightgrey
#c8d1d5lightgrey
Secondary
#3d2e38darkslategray
#3d2e38darkslategray
Secondary foreground
#d5c8d1lightgrey
#d5c8d1lightgrey
Muted
#f3e3edlinen
#1c0c17black
Muted foreground
#554e53darkslategray
#b1aaaedarkgray
Accent
#383d2edarkslategray
#383d2edarkslategray
Accent foreground
#d1d5c8lightgrey
#d1d5c8lightgrey
Destructive
#913703saddlebrown
#fa650forangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2e383ddarkslategray
#2e383ddarkslategray

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.36:1AAA
Primary button7.75:1AAA
Secondary button7.89:1AAA
Muted text6.52:1AA
Accent7.50:1AAA
Destructive7.63:1AAA
Dark mode
Text on background19.73:1AAA
Text on card19.73:1AAA
Primary button7.75:1AAA
Secondary button7.89:1AAA
Muted text8.26:1AAA
Accent7.50:1AAA
Destructive6.94:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.162 0.022 230.799);
  --muted: oklch(0.93 0.022 338.47);
  --muted-foreground: oklch(0.433 0.011 338.503);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.162 0.022 230.799);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.162 0.022 230.799);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.333 0.016 231.416);
  --primary-foreground: oklch(0.854 0.012 230.85);
  --secondary: oklch(0.322 0.027 339.652);
  --secondary-foreground: oklch(0.846 0.019 338.451);
  --accent: oklch(0.35 0.026 123.412);
  --accent-foreground: oklch(0.867 0.019 122.56);
  --destructive: oklch(0.458 0.133 43.207);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.333 0.016 231.416);
  --chart-1: oklch(0.333 0.016 231.416);
  --chart-2: oklch(0.322 0.027 339.652);
  --chart-3: oklch(0.35 0.026 123.412);
  --chart-4: oklch(0.351 0.03 339.696);
  --chart-5: oklch(0.334 0.019 231.607);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.01 229.562);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.185 0.033 341.404);
  --muted-foreground: oklch(0.745 0.01 338.249);
  --popover: oklch(0.147 0.01 229.562);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.147 0.01 229.562);
  --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.333 0.016 231.416);
  --primary-foreground: oklch(0.854 0.012 230.85);
  --secondary: oklch(0.322 0.027 339.652);
  --secondary-foreground: oklch(0.846 0.019 338.451);
  --accent: oklch(0.35 0.026 123.412);
  --accent-foreground: oklch(0.867 0.019 122.56);
  --destructive: oklch(0.688 0.199 43.076);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.333 0.016 231.416);
  --chart-1: oklch(0.333 0.016 231.416);
  --chart-2: oklch(0.322 0.027 339.652);
  --chart-3: oklch(0.35 0.026 123.412);
  --chart-4: oklch(0.351 0.03 339.696);
  --chart-5: oklch(0.334 0.019 231.607);
}