Ear for shadcn/ui

Ear is a shadcn/ui theme built around a purple primary color (#952f98) with muted light purple accents (#ddcede). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the purple primary (#952f98) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#000000black
Foreground
#140515black
#fbf9fbsnow
Card
#fcf8fcsnow
#000000black
Card foreground
#140515black
#fbf9fbsnow
Popover
#fcf8fcsnow
#000000black
Popover foreground
#140515black
#fbf9fbsnow
Primary
#952f98rebeccapurple
#952f98rebeccapurple
Primary foreground
#fefbfewhite
#fefbfewhite
Secondary
#ddcedegainsboro
#211622black
Secondary foreground
#483249darkslategray
#c3a6c4silver
Muted
#e3dde3gainsboro
#211c22black
Muted foreground
#565256dimgray
#aca9addarkgray
Accent
#ddcedegainsboro
#211622black
Accent foreground
#483249darkslategray
#c3a6c4silver
Destructive
#bd460ffirebrick
#de5212chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#952f98rebeccapurple
#952f98rebeccapurple

Contrast

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

Light mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button6.53:1AA
Secondary button7.66:1AAA
Muted text5.76:1AA
Accent7.66:1AAA
Destructive5.19:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button6.53:1AA
Secondary button7.93:1AAA
Muted text7.22:1AAA
Accent7.93:1AAA
Destructive3.94:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 324.659);
  --foreground: oklch(0.151 0.044 326.289);
  --muted: oklch(0.905 0.01 324.692);
  --muted-foreground: oklch(0.445 0.007 324.716);
  --popover: oklch(0.983 0.006 324.659);
  --popover-foreground: oklch(0.151 0.044 326.289);
  --card: oklch(0.983 0.006 324.659);
  --card-foreground: oklch(0.151 0.044 326.289);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.498 0.184 326.498);
  --primary-foreground: oklch(0.991 0.004 324.647);
  --secondary: oklch(0.87 0.027 324.811);
  --secondary-foreground: oklch(0.351 0.05 325.459);
  --accent: oklch(0.87 0.027 324.811);
  --accent-foreground: oklch(0.351 0.05 325.459);
  --destructive: oklch(0.551 0.164 40.559);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.498 0.184 326.498);
  --chart-1: oklch(0.498 0.184 326.498);
  --chart-2: oklch(0.87 0.027 324.811);
  --chart-3: oklch(0.87 0.027 324.811);
  --chart-4: oklch(0.894 0.021 324.77);
  --chart-5: oklch(0.501 0.191 326.537);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.004 324.644);
  --muted: oklch(0.234 0.015 325.005);
  --muted-foreground: oklch(0.739 0.006 324.67);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.004 324.644);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.984 0.004 324.644);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.498 0.184 326.498);
  --primary-foreground: oklch(0.991 0.004 324.647);
  --secondary: oklch(0.221 0.027 325.351);
  --secondary-foreground: oklch(0.76 0.052 325.045);
  --accent: oklch(0.221 0.027 325.351);
  --accent-foreground: oklch(0.76 0.052 325.045);
  --destructive: oklch(0.62 0.186 40.312);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.498 0.184 326.498);
  --chart-1: oklch(0.498 0.184 326.498);
  --chart-2: oklch(0.221 0.027 325.351);
  --chart-3: oklch(0.221 0.027 325.351);
  --chart-4: oklch(0.252 0.033 325.404);
  --chart-5: oklch(0.501 0.191 326.537);
}