Digestion for shadcn/ui

Digestion is a shadcn/ui theme built around a light violet primary color (#cab7e1) with light purple accents (#dfb7e1). The light mode uses a neutral background (#ffffff). Dark mode keeps the light violet primary (#cab7e1) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#020104black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#020104black
#ffffffwhite
Primary
#cab7e1thistle
#cab7e1thistle
Primary foreground
#311e48midnightblue
#311e48midnightblue
Secondary
#b7b9e1lightsteelblue
#b7b9e1lightsteelblue
Secondary foreground
#1e2048midnightblue
#1e2048midnightblue
Muted
#d1d2e1lightgrey
#1e1f2edarkslategray
Muted foreground
#404045darkslategray
#bababfsilver
Accent
#dfb7e1thistle
#dfb7e1thistle
Accent foreground
#461e48darkslategray
#461e48darkslategray
Destructive
#cc3a05firebrick
#fa6c38tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cab7e1thistle
#cab7e1thistle

Contrast

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

Light mode
Text on background20.81:1AAA
Text on card20.54:1AAA
Primary button8.06:1AAA
Secondary button8.15:1AAA
Muted text6.85:1AA
Accent7.79:1AAA
Destructive5.02:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button8.06:1AAA
Secondary button8.15:1AAA
Muted text8.40:1AAA
Accent7.79:1AAA
Destructive7.25:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.08 0.018 307.846);
  --muted: oklch(0.866 0.021 283.544);
  --muted-foreground: oklch(0.373 0.009 283.567);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.08 0.018 307.846);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.809 0.061 305.458);
  --primary-foreground: oklch(0.282 0.076 302.564);
  --secondary: oklch(0.798 0.056 282.675);
  --secondary-foreground: oklch(0.266 0.073 277.976);
  --accent: oklch(0.828 0.072 324.615);
  --accent-foreground: oklch(0.311 0.087 325.503);
  --destructive: oklch(0.563 0.19 36.132);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.809 0.061 305.458);
  --chart-1: oklch(0.809 0.061 305.458);
  --chart-2: oklch(0.798 0.056 282.675);
  --chart-3: oklch(0.828 0.072 324.615);
  --chart-4: oklch(0.829 0.047 282.935);
  --chart-5: oklch(0.807 0.066 305.383);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.246 0.029 281.704);
  --muted-foreground: oklch(0.791 0.007 283.816);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.809 0.061 305.458);
  --primary-foreground: oklch(0.282 0.076 302.564);
  --secondary: oklch(0.798 0.056 282.675);
  --secondary-foreground: oklch(0.266 0.073 277.976);
  --accent: oklch(0.828 0.072 324.615);
  --accent-foreground: oklch(0.311 0.087 325.503);
  --destructive: oklch(0.698 0.186 39.38);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.809 0.061 305.458);
  --chart-1: oklch(0.809 0.061 305.458);
  --chart-2: oklch(0.798 0.056 282.675);
  --chart-3: oklch(0.828 0.072 324.615);
  --chart-4: oklch(0.829 0.047 282.935);
  --chart-5: oklch(0.807 0.066 305.383);
}