Elixir for shadcn/ui

Elixir is a shadcn/ui theme built around a vivid light yellow primary color (#fefa86) with muted light yellow accents (#e1e1db). The light mode uses a neutral background (#fefdfb). Dark mode keeps the vivid light yellow primary (#fefa86) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefdfbsnow
#000000black
Foreground
#080802black
#ffffffwhite
Card
#fefdfbsnow
#000000black
Card foreground
#080802black
#ffffffwhite
Popover
#fefdfbsnow
#000000black
Popover foreground
#080802black
#ffffffwhite
Primary
#fefa86khaki
#fefa86khaki
Primary foreground
#514e01darkolivegreen
#514e01darkolivegreen
Secondary
#e1e1dbgainsboro
#323125darkslategray
Secondary foreground
#4b4b3fdarkslategray
#cdcdbcsilver
Muted
#efefeblinen
#141410black
Muted foreground
#64634adarkolivegreen
#b5b49bdarkgray
Accent
#e1e1dbgainsboro
#323125darkslategray
Accent foreground
#4b4b3fdarkslategray
#cdcdbcsilver
Destructive
#df0101red
#fe1616red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fefa86khaki
#fefa86khaki

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button7.86:1AAA
Secondary button6.70:1AA
Muted text5.31:1AA
Accent6.70:1AA
Destructive5.05:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.86:1AAA
Secondary button8.11:1AAA
Muted text8.79:1AAA
Accent8.11:1AAA
Destructive3.93:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 104.856);
  --foreground: oklch(0.13 0.017 107.221);
  --muted: oklch(0.951 0.005 104.892);
  --muted-foreground: oklch(0.493 0.038 106.068);
  --popover: oklch(0.995 0.003 104.856);
  --popover-foreground: oklch(0.13 0.017 107.221);
  --card: oklch(0.995 0.003 104.856);
  --card-foreground: oklch(0.13 0.017 107.221);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.964 0.138 106.968);
  --primary-foreground: oklch(0.414 0.088 107.438);
  --secondary: oklch(0.907 0.008 104.957);
  --secondary-foreground: oklch(0.408 0.019 105.605);
  --accent: oklch(0.907 0.008 104.957);
  --accent-foreground: oklch(0.408 0.019 105.605);
  --destructive: oklch(0.568 0.233 29.196);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.964 0.138 106.968);
  --chart-1: oklch(0.964 0.138 106.968);
  --chart-2: oklch(0.907 0.008 104.957);
  --chart-3: oklch(0.907 0.008 104.957);
  --chart-4: oklch(0.929 0.006 104.919);
  --chart-5: oklch(0.969 0.142 107.001);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.188 0.007 105.423);
  --muted-foreground: oklch(0.765 0.035 105.573);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.964 0.138 106.968);
  --primary-foreground: oklch(0.414 0.088 107.438);
  --secondary: oklch(0.311 0.021 105.943);
  --secondary-foreground: oklch(0.843 0.023 105.278);
  --accent: oklch(0.311 0.021 105.943);
  --accent-foreground: oklch(0.843 0.023 105.278);
  --destructive: oklch(0.631 0.252 28.615);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.964 0.138 106.968);
  --chart-1: oklch(0.964 0.138 106.968);
  --chart-2: oklch(0.311 0.021 105.943);
  --chart-3: oklch(0.311 0.021 105.943);
  --chart-4: oklch(0.345 0.025 105.978);
  --chart-5: oklch(0.969 0.142 107.001);
}