Odd for shadcn/ui

Odd is a shadcn/ui theme built around a vivid light violet primary color (#e5c6fa) with vivid light green accents (#dcfac6). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light violet primary (#e5c6fa) on a violet-tinted background (#08040b).

Color palette

TokenLightDark
Background
#ffffffwhite
#08040bblack
Foreground
#0b0312black
#f8f4fawhitesmoke
Card
#fcfcfcsnow
#0b050fblack
Card foreground
#09020dblack
#faf8fcghostwhite
Popover
#ffffffwhite
#08040bblack
Popover foreground
#0b0312black
#f8f4fawhitesmoke
Primary
#e5c6falavender
#e5c6falavender
Primary foreground
#520b84indigo
#520b84indigo
Secondary
#dcfac6lightgoldenrodyellow
#dcfac6lightgoldenrodyellow
Secondary foreground
#122603black
#122603black
Muted
#dde2d9gainsboro
#20261dblack
Muted foreground
#51554edarkslategray
#adb1aadarkgray
Accent
#dcfac6lightgoldenrodyellow
#dcfac6lightgoldenrodyellow
Accent foreground
#122603black
#122603black
Destructive
#da430borangered
#f56b38tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e5c6falavender
#e5c6falavender

Contrast

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

Light mode
Text on background20.27:1AAA
Text on card20.02:1AAA
Primary button7.94:1AAA
Secondary button14.25:1AAA
Muted text5.80:1AA
Accent14.25:1AAA
Destructive4.39:1AA Large
Dark mode
Text on background18.70:1AAA
Text on card19.06:1AAA
Primary button7.94:1AAA
Secondary button14.25:1AAA
Muted text7.12:1AAA
Accent14.25:1AAA
Destructive7.00:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.126 0.04 311.877);
  --muted: oklch(0.908 0.014 131.848);
  --muted-foreground: oklch(0.443 0.012 131.939);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.126 0.04 311.877);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.114 0.035 313.609);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.87 0.078 311.007);
  --primary-foreground: oklch(0.356 0.176 303.958);
  --secondary: oklch(0.951 0.075 132.404);
  --secondary-foreground: oklch(0.241 0.064 134.459);
  --accent: oklch(0.951 0.075 132.404);
  --accent-foreground: oklch(0.241 0.064 134.459);
  --destructive: oklch(0.596 0.196 36.624);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.87 0.078 311.007);
  --chart-1: oklch(0.87 0.078 311.007);
  --chart-2: oklch(0.951 0.075 132.404);
  --chart-3: oklch(0.951 0.075 132.404);
  --chart-4: oklch(0.963 0.057 132.219);
  --chart-5: oklch(0.869 0.08 310.98);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.023 313.143);
  --foreground: oklch(0.973 0.008 311.654);
  --muted: oklch(0.259 0.019 132.338);
  --muted-foreground: oklch(0.754 0.01 131.834);
  --popover: oklch(0.12 0.023 313.143);
  --popover-foreground: oklch(0.973 0.008 311.654);
  --card: oklch(0.132 0.026 311.694);
  --card-foreground: oklch(0.982 0.006 311.678);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.87 0.078 311.007);
  --primary-foreground: oklch(0.356 0.176 303.958);
  --secondary: oklch(0.951 0.075 132.404);
  --secondary-foreground: oklch(0.241 0.064 134.459);
  --accent: oklch(0.951 0.075 132.404);
  --accent-foreground: oklch(0.241 0.064 134.459);
  --destructive: oklch(0.689 0.181 39.451);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.87 0.078 311.007);
  --chart-1: oklch(0.87 0.078 311.007);
  --chart-2: oklch(0.951 0.075 132.404);
  --chart-3: oklch(0.951 0.075 132.404);
  --chart-4: oklch(0.963 0.057 132.219);
  --chart-5: oklch(0.869 0.08 310.98);
}