Oval for shadcn/ui

Oval is a shadcn/ui theme built around a light violet primary color (#e7dbf6) with light green accents (#dbf6e7). The light mode uses a neutral background (#faf8fc). Dark mode keeps the light violet primary (#e7dbf6) on a violet-tinted background (#0a060e).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#0a060eblack
Foreground
#000000black
#ffffffwhite
Card
#f7f4fawhitesmoke
#0c0811black
Card foreground
#000000black
#ffffffwhite
Popover
#faf8fcghostwhite
#0a060eblack
Popover foreground
#000000black
#ffffffwhite
Primary
#e7dbf6lavender
#e7dbf6lavender
Primary foreground
#4c207edarkslateblue
#4c207edarkslateblue
Secondary
#f6e7dbantiquewhite
#f6e7dbantiquewhite
Secondary foreground
#2d1b0cblack
#2d1b0cblack
Muted
#e7e5e4gainsboro
#1b1918black
Muted foreground
#544940darkolivegreen
#bfb4absilver
Accent
#dbf6e7honeydew
#dbf6e7honeydew
Accent foreground
#0c2d1bblack
#0c2d1bblack
Destructive
#8a2b05saddlebrown
#ec4909orangered
Destructive foreground
#fdd4c4peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7dbf6lavender
#e7dbf6lavender

Contrast

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

Light mode
Text on background19.86:1AAA
Text on card19.31:1AAA
Primary button8.70:1AAA
Secondary button13.63:1AAA
Muted text6.97:1AA
Accent12.99:1AAA
Destructive6.36:1AA
Dark mode
Text on background20.05:1AAA
Text on card19.82:1AAA
Primary button8.70:1AAA
Secondary button13.63:1AAA
Muted text8.59:1AAA
Accent12.99:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 307.038);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.924 0.003 64.054);
  --muted-foreground: oklch(0.414 0.022 63.375);
  --popover: oklch(0.981 0.006 307.038);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.009 307);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.908 0.039 306.59);
  --primary-foreground: oklch(0.362 0.148 300.337);
  --secondary: oklch(0.936 0.023 63.77);
  --secondary-foreground: oklch(0.241 0.038 60.637);
  --accent: oklch(0.948 0.034 162.501);
  --accent-foreground: oklch(0.265 0.051 156.764);
  --destructive: oklch(0.429 0.136 38.087);
  --destructive-foreground: oklch(0.901 0.051 42.724);
  --ring: oklch(0.908 0.039 306.59);
  --chart-1: oklch(0.908 0.039 306.59);
  --chart-2: oklch(0.936 0.023 63.77);
  --chart-3: oklch(0.948 0.034 162.501);
  --chart-4: oklch(0.958 0.015 63.885);
  --chart-5: oklch(0.907 0.041 306.562);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.018 306.828);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.216 0.004 63.867);
  --muted-foreground: oklch(0.778 0.019 63.782);
  --popover: oklch(0.135 0.018 306.828);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.146 0.021 305.599);
  --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.908 0.039 306.59);
  --primary-foreground: oklch(0.362 0.148 300.337);
  --secondary: oklch(0.936 0.023 63.77);
  --secondary-foreground: oklch(0.241 0.038 60.637);
  --accent: oklch(0.948 0.034 162.501);
  --accent-foreground: oklch(0.265 0.051 156.764);
  --destructive: oklch(0.633 0.209 37.004);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.908 0.039 306.59);
  --chart-1: oklch(0.908 0.039 306.59);
  --chart-2: oklch(0.936 0.023 63.77);
  --chart-3: oklch(0.948 0.034 162.501);
  --chart-4: oklch(0.958 0.015 63.885);
  --chart-5: oklch(0.907 0.041 306.562);
}