Obedient for shadcn/ui

Obedient is a shadcn/ui theme built around a neutral gray primary color (#2d292e) with muted light purple accents (#d9cddb). The light mode uses a neutral background (#fefbfe). Dark mode keeps the neutral gray primary (#2d292e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfewhite
#000000black
Foreground
#100311black
#fdfcfdwhite
Card
#fdf6fdsnow
#030303black
Card foreground
#0c020dblack
#ffffffwhite
Popover
#fefbfewhite
#000000black
Popover foreground
#100311black
#fdfcfdwhite
Primary
#2d292edarkslategray
#2d292edarkslategray
Primary foreground
#c7c1c8silver
#c7c1c8silver
Secondary
#d9cddblightgrey
#343135darkslategray
Secondary foreground
#423144darkslategray
#cdcacelightgrey
Muted
#ede8edlavender
#161217black
Muted foreground
#655068dimgray
#ad97afdarkgray
Accent
#d9cddblightgrey
#343135darkslategray
Accent foreground
#423144darkslategray
#cdcacelightgrey
Destructive
#d4340cfirebrick
#e3380dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2d292edarkslategray
#2d292edarkslategray

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.23:1AAA
Primary button8.10:1AAA
Secondary button7.79:1AAA
Muted text5.98:1AA
Accent7.79:1AAA
Destructive4.88:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.67:1AAA
Primary button8.10:1AAA
Secondary button7.86:1AAA
Muted text6.90:1AA
Accent7.86:1AAA
Destructive4.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.006 322.65);
  --foreground: oklch(0.135 0.042 324.178);
  --muted: oklch(0.936 0.008 322.661);
  --muted-foreground: oklch(0.462 0.046 323.012);
  --popover: oklch(0.991 0.006 322.65);
  --popover-foreground: oklch(0.135 0.042 324.178);
  --card: oklch(0.981 0.011 322.674);
  --card-foreground: oklch(0.12 0.037 324.536);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.287 0.011 322.785);
  --primary-foreground: oklch(0.818 0.012 322.685);
  --secondary: oklch(0.862 0.023 322.734);
  --secondary-foreground: oklch(0.341 0.039 323.064);
  --accent: oklch(0.862 0.023 322.734);
  --accent-foreground: oklch(0.341 0.039 323.064);
  --destructive: oklch(0.572 0.201 33.647);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.287 0.011 322.785);
  --chart-1: oklch(0.287 0.011 322.785);
  --chart-2: oklch(0.862 0.023 322.734);
  --chart-3: oklch(0.862 0.023 322.734);
  --chart-4: oklch(0.886 0.019 322.713);
  --chart-5: oklch(0.285 0.017 322.863);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 322.631);
  --muted: oklch(0.19 0.012 322.874);
  --muted-foreground: oklch(0.704 0.042 322.861);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 322.631);
  --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.287 0.011 322.785);
  --primary-foreground: oklch(0.818 0.012 322.685);
  --secondary: oklch(0.319 0.007 322.709);
  --secondary-foreground: oklch(0.844 0.005 322.651);
  --accent: oklch(0.319 0.007 322.709);
  --accent-foreground: oklch(0.844 0.005 322.651);
  --destructive: oklch(0.6 0.212 33.591);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.287 0.011 322.785);
  --chart-1: oklch(0.287 0.011 322.785);
  --chart-2: oklch(0.319 0.007 322.709);
  --chart-3: oklch(0.319 0.007 322.709);
  --chart-4: oklch(0.349 0.007 322.712);
  --chart-5: oklch(0.285 0.017 322.863);
}