Mediocre for shadcn/ui

Mediocre is a shadcn/ui theme built around a muted violet primary color (#9691a6) with muted purple accents (#a191a6). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the muted violet primary (#9691a6) on a violet-tinted background (#08060f).

Color palette

TokenLightDark
Background
#fcfbfewhite
#08060fblack
Foreground
#08050fblack
#fcfcfdwhite
Card
#fcfbfewhite
#08060fblack
Card foreground
#08050fblack
#fcfcfdwhite
Popover
#fcfbfewhite
#08060fblack
Popover foreground
#08050fblack
#fcfcfdwhite
Primary
#9691a6darkgray
#9691a6darkgray
Primary foreground
#020203black
#020203black
Secondary
#9196a6darkgray
#9196a6darkgray
Secondary foreground
#020203black
#020203black
Muted
#d8dadfgainsboro
#202227black
Muted foreground
#535765dimgray
#9a9facdarkgray
Accent
#a191a6darkgray
#a191a6darkgray
Accent foreground
#030203black
#030203black
Destructive
#8f1e0adarkred
#f15337tomato
Destructive foreground
#fcd6cfbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9691a6darkgray
#9691a6darkgray

Contrast

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

Light mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button6.79:1AA
Secondary button7.03:1AAA
Muted text5.13:1AA
Accent6.99:1AA
Destructive6.64:1AA
Dark mode
Text on background19.66:1AAA
Text on card19.66:1AAA
Primary button6.79:1AA
Secondary button7.03:1AAA
Muted text5.99:1AA
Accent6.99:1AA
Destructive3.48:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 297.751);
  --foreground: oklch(0.127 0.025 296.459);
  --muted: oklch(0.888 0.007 271.337);
  --muted-foreground: oklch(0.459 0.023 270.871);
  --popover: oklch(0.989 0.004 297.751);
  --popover-foreground: oklch(0.127 0.025 296.459);
  --card: oklch(0.989 0.004 297.751);
  --card-foreground: oklch(0.127 0.025 296.459);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.667 0.033 296.954);
  --primary-foreground: oklch(0.089 0.003 297.774);
  --secondary: oklch(0.674 0.025 271.028);
  --secondary-foreground: oklch(0.09 0.002 270.217);
  --accent: oklch(0.677 0.037 317.674);
  --accent-foreground: oklch(0.09 0.003 318.117);
  --destructive: oklch(0.426 0.151 32.13);
  --destructive-foreground: oklch(0.906 0.043 29.712);
  --ring: oklch(0.667 0.033 296.954);
  --chart-1: oklch(0.667 0.033 296.954);
  --chart-2: oklch(0.674 0.025 271.028);
  --chart-3: oklch(0.677 0.037 317.674);
  --chart-4: oklch(0.701 0.023 271.079);
  --chart-5: oklch(0.661 0.042 296.699);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.022 296.622);
  --foreground: oklch(0.991 0.002 297.782);
  --muted: oklch(0.253 0.009 271.028);
  --muted-foreground: oklch(0.702 0.021 271.112);
  --popover: oklch(0.129 0.022 296.622);
  --popover-foreground: oklch(0.991 0.002 297.782);
  --card: oklch(0.129 0.022 296.622);
  --card-foreground: oklch(0.991 0.002 297.782);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.667 0.033 296.954);
  --primary-foreground: oklch(0.089 0.003 297.774);
  --secondary: oklch(0.674 0.025 271.028);
  --secondary-foreground: oklch(0.09 0.002 270.217);
  --accent: oklch(0.677 0.037 317.674);
  --accent-foreground: oklch(0.09 0.003 318.117);
  --destructive: oklch(0.654 0.199 32.346);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.667 0.033 296.954);
  --chart-1: oklch(0.667 0.033 296.954);
  --chart-2: oklch(0.674 0.025 271.028);
  --chart-3: oklch(0.677 0.037 317.674);
  --chart-4: oklch(0.701 0.023 271.079);
  --chart-5: oklch(0.661 0.042 296.699);
}