Edible for shadcn/ui

Edible is a shadcn/ui theme built around a vivid indigo primary color (#4019ff) with vivid violet accents (#b319ff). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the vivid indigo primary (#4019ff) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#020104black
Foreground
#060411black
#f6f6f9whitesmoke
Card
#f4f2fcwhitesmoke
#030208black
Card foreground
#04030dblack
#f9f9fbghostwhite
Popover
#f8f7fdghostwhite
#020104black
Popover foreground
#060411black
#f6f6f9whitesmoke
Primary
#4019ffblue
#4019ffblue
Primary foreground
#eae6fflavender
#eae6fflavender
Secondary
#1966ffdodgerblue
#1966ffdodgerblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e4e7eclavender
#13161bblack
Muted foreground
#555b68dimgray
#979eaadarkgray
Accent
#b319ffblueviolet
#b319ffblueviolet
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a01308darkred
#f4372aorangered
Destructive foreground
#fddfddmistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4019ffblue
#4019ffblue

Contrast

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

Light mode
Text on background19.01:1AAA
Text on card18.54:1AAA
Primary button6.15:1AA
Secondary button4.78:1AA
Muted text5.49:1AA
Accent4.67:1AA
Destructive6.48:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.64:1AAA
Primary button6.15:1AA
Secondary button4.78:1AA
Muted text6.73:1AA
Accent4.67:1AA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 293.894);
  --foreground: oklch(0.119 0.033 290.943);
  --muted: oklch(0.927 0.007 264.526);
  --muted-foreground: oklch(0.471 0.022 264.34);
  --popover: oklch(0.978 0.009 293.894);
  --popover-foreground: oklch(0.119 0.033 290.943);
  --card: oklch(0.966 0.014 293.804);
  --card-foreground: oklch(0.107 0.029 291.901);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.483 0.294 273.481);
  --primary-foreground: oklch(0.934 0.035 293.37);
  --secondary: oklch(0.566 0.238 262.194);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.599 0.293 309.085);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.45 0.174 29.743);
  --destructive-foreground: oklch(0.928 0.033 22.649);
  --ring: oklch(0.483 0.294 273.481);
  --chart-1: oklch(0.483 0.294 273.481);
  --chart-2: oklch(0.566 0.238 262.194);
  --chart-3: oklch(0.599 0.293 309.085);
  --chart-4: oklch(0.589 0.224 262.116);
  --chart-5: oklch(0.484 0.299 272.732);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.076 0.018 292.374);
  --foreground: oklch(0.973 0.005 293.972);
  --muted: oklch(0.199 0.011 264.299);
  --muted-foreground: oklch(0.697 0.02 264.439);
  --popover: oklch(0.076 0.018 292.374);
  --popover-foreground: oklch(0.973 0.005 293.972);
  --card: oklch(0.096 0.023 292.374);
  --card-foreground: oklch(0.982 0.003 294.004);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.483 0.294 273.481);
  --primary-foreground: oklch(0.934 0.035 293.37);
  --secondary: oklch(0.566 0.238 262.194);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.599 0.293 309.085);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.631 0.225 29.228);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.483 0.294 273.481);
  --chart-1: oklch(0.483 0.294 273.481);
  --chart-2: oklch(0.566 0.238 262.194);
  --chart-3: oklch(0.599 0.293 309.085);
  --chart-4: oklch(0.589 0.224 262.116);
  --chart-5: oklch(0.484 0.299 272.732);
}