Electric Crocodile Tears for shadcn/ui

Electric Crocodile Tears is a shadcn/ui theme built around a yellow primary color (#dbd89a) with indigo accents (#9a9cdb). The light mode uses a neutral background (#fefefb). Dark mode keeps the yellow primary (#dbd89a) on a neutral background (#070703).

Color palette

TokenLightDark
Background
#fefefbwhite
#070703black
Foreground
#040401black
#ffffffwhite
Card
#fcfcf7snow
#0b0b05black
Card foreground
#000000black
#ffffffwhite
Popover
#fefefbwhite
#070703black
Popover foreground
#040401black
#ffffffwhite
Primary
#dbd89akhaki
#dbd89akhaki
Primary foreground
#313012darkslategray
#313012darkslategray
Secondary
#9a9cdbmediumpurple
#9a9cdbmediumpurple
Secondary foreground
#121331black
#121331black
Muted
#dbdcebgainsboro
#141524black
Muted foreground
#56576cdimgray
#9394a9darkgray
Accent
#9a9cdbmediumpurple
#9a9cdbmediumpurple
Accent foreground
#121331black
#121331black
Destructive
#ab2507firebrick
#f5350aorangered
Destructive foreground
#feebe7linen
#ffffffwhite
Border
#ebebe5linen
#1d1d16black
Input
#ebebe5linen
#1d1d16black
Ring
#dbd89akhaki
#dbd89akhaki

Contrast

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

Light mode
Text on background20.26:1AAA
Text on card20.45:1AAA
Primary button9.16:1AAA
Secondary button6.99:1AA
Muted text5.18:1AA
Accent6.99:1AA
Destructive6.06:1AA
Dark mode
Text on background20.16:1AAA
Text on card19.77:1AAA
Primary button9.16:1AAA
Secondary button6.99:1AA
Muted text6.06:1AA
Accent6.99:1AA
Destructive3.89:1AA Large

CSS variables

Paste this into your globals.css to use Electric Crocodile Tears in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.003 104.864);
  --foreground: oklch(0.103 0.013 107.256);
  --muted: oklch(0.898 0.02 284.411);
  --muted-foreground: oklch(0.464 0.033 283.465);
  --popover: oklch(0.995 0.003 104.864);
  --popover-foreground: oklch(0.103 0.013 107.256);
  --card: oklch(0.991 0.006 104.92);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.939 0.009 104.972);
  --input: oklch(0.939 0.009 104.972);
  --primary: oklch(0.87 0.081 106.303);
  --primary-foreground: oklch(0.301 0.047 107.111);
  --secondary: oklch(0.714 0.091 282.312);
  --secondary-foreground: oklch(0.204 0.059 278.353);
  --accent: oklch(0.714 0.091 282.312);
  --accent-foreground: oklch(0.204 0.059 278.353);
  --destructive: oklch(0.485 0.174 32.994);
  --destructive-foreground: oklch(0.954 0.022 32.679);
  --ring: oklch(0.87 0.081 106.303);
  --chart-1: oklch(0.87 0.081 106.303);
  --chart-2: oklch(0.714 0.091 282.312);
  --chart-3: oklch(0.714 0.091 282.312);
  --chart-4: oklch(0.747 0.08 282.745);
  --chart-5: oklch(0.875 0.086 106.372);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.127 0.013 106.774);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.203 0.029 281.952);
  --muted-foreground: oklch(0.673 0.03 283.987);
  --popover: oklch(0.127 0.013 106.774);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.145 0.015 106.725);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.229 0.014 105.803);
  --input: oklch(0.229 0.014 105.803);
  --primary: oklch(0.87 0.081 106.303);
  --primary-foreground: oklch(0.301 0.047 107.111);
  --secondary: oklch(0.714 0.091 282.312);
  --secondary-foreground: oklch(0.204 0.059 278.353);
  --accent: oklch(0.714 0.091 282.312);
  --accent-foreground: oklch(0.204 0.059 278.353);
  --destructive: oklch(0.63 0.23 32.658);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.87 0.081 106.303);
  --chart-1: oklch(0.87 0.081 106.303);
  --chart-2: oklch(0.714 0.091 282.312);
  --chart-3: oklch(0.714 0.091 282.312);
  --chart-4: oklch(0.747 0.08 282.745);
  --chart-5: oklch(0.875 0.086 106.372);
}