Oats for shadcn/ui

Oats is a shadcn/ui theme built around an indigo primary color (#7c6abe) with green accents (#6abe7c). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the indigo primary (#7c6abe) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbfewhite
#000000black
Foreground
#020104black
#f6f5f9whitesmoke
Card
#f9f8fcghostwhite
#030303black
Card foreground
#000000black
#f9f9fbghostwhite
Popover
#fcfbfewhite
#000000black
Popover foreground
#020104black
#f6f5f9whitesmoke
Primary
#7c6abeslateblue
#7c6abeslateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#be7c6aindianred
#be7c6aindianred
Secondary foreground
#000000black
#000000black
Muted
#f5f1efwhitesmoke
#100b0ablack
Muted foreground
#585655dimgray
#aaa7a7darkgray
Accent
#6abe7cdarkseagreen
#6abe7cdarkseagreen
Accent foreground
#000000black
#000000black
Destructive
#940a00darkred
#ff3729orangered
Destructive foreground
#ffcbc7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7c6abeslateblue
#7c6abeslateblue

Contrast

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

Light mode
Text on background20.21:1AAA
Text on card19.79:1AAA
Primary button4.49:1AA Large
Secondary button6.28:1AA
Muted text6.49:1AA
Accent9.24:1AAA
Destructive6.35:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.66:1AAA
Primary button4.49:1AA Large
Secondary button6.28:1AA
Muted text8.18:1AAA
Accent9.24:1AAA
Destructive3.60:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 296.273);
  --foreground: oklch(0.073 0.022 295.201);
  --muted: oklch(0.96 0.005 35.994);
  --muted-foreground: oklch(0.454 0.004 35.985);
  --popover: oklch(0.99 0.003 296.273);
  --popover-foreground: oklch(0.073 0.022 295.201);
  --card: oklch(0.98 0.006 296.214);
  --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.579 0.126 291.949);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.65 0.087 36.168);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.73 0.125 149.454);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.422 0.168 30.254);
  --destructive-foreground: oklch(0.886 0.06 23.093);
  --ring: oklch(0.579 0.126 291.949);
  --chart-1: oklch(0.579 0.126 291.949);
  --chart-2: oklch(0.65 0.087 36.168);
  --chart-3: oklch(0.73 0.125 149.454);
  --chart-4: oklch(0.675 0.079 36.112);
  --chart-5: oklch(0.573 0.135 291.506);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.973 0.006 296.227);
  --muted: oklch(0.156 0.008 35.918);
  --muted-foreground: oklch(0.731 0.003 35.996);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.973 0.006 296.227);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.982 0.004 296.262);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.579 0.126 291.949);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.65 0.087 36.168);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.73 0.125 149.454);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.651 0.236 29.339);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.579 0.126 291.949);
  --chart-1: oklch(0.579 0.126 291.949);
  --chart-2: oklch(0.65 0.087 36.168);
  --chart-3: oklch(0.73 0.125 149.454);
  --chart-4: oklch(0.675 0.079 36.112);
  --chart-5: oklch(0.573 0.135 291.506);
}