Oddball for shadcn/ui

Oddball is a shadcn/ui theme built around a deep green primary color (#39531d) with muted light green accents (#c7cfbe). The light mode uses a neutral background (#fcfefb). Dark mode keeps the deep green primary (#39531d) on a neutral background (#030401).

Color palette

TokenLightDark
Background
#fcfefbwhite
#030401black
Foreground
#0d1505black
#f7f9f5whitesmoke
Card
#fcfefbwhite
#030401black
Card foreground
#0d1505black
#f7f9f5whitesmoke
Popover
#fcfefbwhite
#030401black
Popover foreground
#0d1505black
#f7f9f5whitesmoke
Primary
#39531ddarkolivegreen
#39531ddarkolivegreen
Primary foreground
#d2e7bblightgrey
#d2e7bblightgrey
Secondary
#d6dad2lightgrey
#242720black
Secondary foreground
#3d4337darkslategray
#bdc3b7silver
Muted
#f0f4ecwhitesmoke
#0f130bblack
Muted foreground
#5c6652dimgray
#a4ad99darkgray
Accent
#c7cfbesilver
#333c2adarkslategray
Accent foreground
#2e3527darkslategray
#ccd5c3lightgrey
Destructive
#962b0dsaddlebrown
#ec5227chocolate
Destructive foreground
#fce1d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#39531ddarkolivegreen
#39531ddarkolivegreen

Contrast

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

Light mode
Text on background18.36:1AAA
Text on card18.36:1AAA
Primary button6.53:1AA
Secondary button7.22:1AAA
Muted text5.40:1AA
Accent7.93:1AAA
Destructive6.38:1AA
Dark mode
Text on background19.42:1AAA
Text on card19.42:1AAA
Primary button6.53:1AA
Secondary button8.41:1AAA
Muted text8.04:1AAA
Accent7.64:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 127.83);
  --foreground: oklch(0.181 0.033 129.357);
  --muted: oklch(0.961 0.011 127.922);
  --muted-foreground: oklch(0.495 0.033 128.609);
  --popover: oklch(0.994 0.003 127.83);
  --popover-foreground: oklch(0.181 0.033 129.357);
  --card: oklch(0.994 0.003 127.83);
  --card-foreground: oklch(0.181 0.033 129.357);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.408 0.086 131.013);
  --primary-foreground: oklch(0.901 0.063 128.636);
  --secondary: oklch(0.884 0.012 127.946);
  --secondary-foreground: oklch(0.375 0.022 128.49);
  --accent: oklch(0.845 0.025 128.134);
  --accent-foreground: oklch(0.317 0.025 128.771);
  --destructive: oklch(0.452 0.148 35.114);
  --destructive-foreground: oklch(0.929 0.031 35.945);
  --ring: oklch(0.408 0.086 131.013);
  --chart-1: oklch(0.408 0.086 131.013);
  --chart-2: oklch(0.884 0.012 127.946);
  --chart-3: oklch(0.845 0.025 128.134);
  --chart-4: oklch(0.906 0.01 127.913);
  --chart-5: oklch(0.413 0.09 131.219);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.014 126.822);
  --foreground: oklch(0.981 0.006 127.859);
  --muted: oklch(0.18 0.016 128.9);
  --muted-foreground: oklch(0.735 0.03 128.284);
  --popover: oklch(0.1 0.014 126.822);
  --popover-foreground: oklch(0.981 0.006 127.859);
  --card: oklch(0.1 0.014 126.822);
  --card-foreground: oklch(0.981 0.006 127.859);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.408 0.086 131.013);
  --primary-foreground: oklch(0.901 0.063 128.636);
  --secondary: oklch(0.267 0.012 128.349);
  --secondary-foreground: oklch(0.808 0.018 128.047);
  --accent: oklch(0.342 0.031 128.924);
  --accent-foreground: oklch(0.861 0.025 128.136);
  --destructive: oklch(0.644 0.198 35.666);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.408 0.086 131.013);
  --chart-1: oklch(0.408 0.086 131.013);
  --chart-2: oklch(0.267 0.012 128.349);
  --chart-3: oklch(0.342 0.031 128.924);
  --chart-4: oklch(0.3 0.015 128.377);
  --chart-5: oklch(0.413 0.09 131.219);
}