Eraser for shadcn/ui

Eraser is a shadcn/ui theme built around a muted light violet primary color (#e7e5eb) with muted light purple accents (#eae5eb). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted light violet primary (#e7e5eb) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#ffffffwhite
#040307black
Foreground
#030109black
#f6f5fawhitesmoke
Card
#fcfcfcsnow
#06050bblack
Card foreground
#020104black
#f9f8fbghostwhite
Popover
#fcfcfcsnow
#06050bblack
Popover foreground
#020104black
#f9f8fbghostwhite
Primary
#e7e5eblavender
#e7e5eblavender
Primary foreground
#4a435bdarkslategray
#4a435bdarkslategray
Secondary
#e5e6eblavender
#e5e6eblavender
Secondary foreground
#43485bdarkslategray
#43485bdarkslategray
Muted
#f1f1f4whitesmoke
#0b0c0eblack
Muted foreground
#404144darkslategray
#bbbcbfsilver
Accent
#eae5eblavender
#eae5eblavender
Accent foreground
#56435bdarkslategray
#56435bdarkslategray
Destructive
#d52410firebrick
#ee301borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7e5eblavender
#e7e5eblavender

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.37:1AAA
Primary button7.46:1AAA
Secondary button7.27:1AAA
Muted text9.06:1AAA
Accent7.17:1AAA
Destructive5.12:1AA
Dark mode
Text on background18.93:1AAA
Text on card19.20:1AAA
Primary button7.46:1AAA
Secondary button7.27:1AAA
Muted text10.31:1AAA
Accent7.17:1AAA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.091 0.03 299.375);
  --muted: oklch(0.959 0.004 273.823);
  --muted-foreground: oklch(0.376 0.005 273.699);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.073 0.024 299.375);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.073 0.024 299.375);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.924 0.009 299.129);
  --primary-foreground: oklch(0.4 0.04 297.544);
  --secondary: oklch(0.926 0.007 273.774);
  --secondary-foreground: oklch(0.406 0.032 272.82);
  --accent: oklch(0.927 0.011 318.886);
  --accent-foreground: oklch(0.412 0.045 318.842);
  --destructive: oklch(0.562 0.213 30.501);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.924 0.009 299.129);
  --chart-1: oklch(0.924 0.009 299.129);
  --chart-2: oklch(0.926 0.007 273.774);
  --chart-3: oklch(0.927 0.011 318.886);
  --chart-4: oklch(0.951 0.005 273.806);
  --chart-5: oklch(0.923 0.011 299.093);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.014 299.331);
  --foreground: oklch(0.973 0.006 299.198);
  --muted: oklch(0.154 0.006 273.417);
  --muted-foreground: oklch(0.794 0.004 273.801);
  --popover: oklch(0.12 0.016 299.316);
  --popover-foreground: oklch(0.982 0.004 299.234);
  --card: oklch(0.12 0.016 299.316);
  --card-foreground: oklch(0.982 0.004 299.234);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.924 0.009 299.129);
  --primary-foreground: oklch(0.4 0.04 297.544);
  --secondary: oklch(0.926 0.007 273.774);
  --secondary-foreground: oklch(0.406 0.032 272.82);
  --accent: oklch(0.927 0.011 318.886);
  --accent-foreground: oklch(0.412 0.045 318.842);
  --destructive: oklch(0.615 0.226 30.515);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.924 0.009 299.129);
  --chart-1: oklch(0.924 0.009 299.129);
  --chart-2: oklch(0.926 0.007 273.774);
  --chart-3: oklch(0.927 0.011 318.886);
  --chart-4: oklch(0.951 0.005 273.806);
  --chart-5: oklch(0.923 0.011 299.093);
}