Distinct for shadcn/ui

Distinct is a shadcn/ui theme built around a muted green primary color (#96a17d) with muted purple accents (#a17d96). The light mode uses a neutral background (#fdfefb). Dark mode keeps the muted green primary (#96a17d) on a neutral background (#060703).

Color palette

TokenLightDark
Background
#fdfefbwhite
#060703black
Foreground
#0d1103black
#fdfdfcwhite
Card
#fdfefbwhite
#060703black
Card foreground
#0d1103black
#fdfdfcwhite
Popover
#fdfefbwhite
#060703black
Popover foreground
#0d1103black
#fdfdfcwhite
Primary
#96a17ddarkseagreen
#96a17ddarkseagreen
Primary foreground
#000000black
#000000black
Secondary
#7d96a1lightslategray
#7d96a1lightslategray
Secondary foreground
#000000black
#000000black
Muted
#d3e2e8gainsboro
#17252cdarkslategray
Muted foreground
#3e4b51darkslategray
#aebbc1silver
Accent
#a17d96rosybrown
#a17d96rosybrown
Accent foreground
#000000black
#000000black
Destructive
#862f04saddlebrown
#f86216orangered
Destructive foreground
#fdd3bfpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#96a17ddarkseagreen
#96a17ddarkseagreen

Contrast

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

Light mode
Text on background18.88:1AAA
Text on card18.88:1AAA
Primary button7.67:1AAA
Secondary button6.74:1AA
Muted text6.79:1AA
Accent5.87:1AA
Destructive6.30:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button7.67:1AAA
Secondary button6.74:1AA
Muted text7.96:1AAA
Accent5.87:1AA
Destructive6.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 120.107);
  --foreground: oklch(0.17 0.032 121.854);
  --muted: oklch(0.904 0.018 225.222);
  --muted-foreground: oklch(0.404 0.019 225.634);
  --popover: oklch(0.995 0.004 120.107);
  --popover-foreground: oklch(0.17 0.032 121.854);
  --card: oklch(0.995 0.004 120.107);
  --card-foreground: oklch(0.17 0.032 121.854);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.69 0.052 121.336);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.657 0.033 225.676);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.632 0.056 337.468);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.427 0.128 41.288);
  --destructive-foreground: oklch(0.898 0.055 48.091);
  --ring: oklch(0.69 0.052 121.336);
  --chart-1: oklch(0.69 0.052 121.336);
  --chart-2: oklch(0.657 0.033 225.676);
  --chart-3: oklch(0.632 0.056 337.468);
  --chart-4: oklch(0.682 0.03 225.585);
  --chart-5: oklch(0.698 0.061 121.56);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.015 119.928);
  --foreground: oklch(0.993 0.001 120.056);
  --muted: oklch(0.256 0.023 226.641);
  --muted-foreground: oklch(0.785 0.016 225.234);
  --popover: oklch(0.126 0.015 119.928);
  --popover-foreground: oklch(0.993 0.001 120.056);
  --card: oklch(0.126 0.015 119.928);
  --card-foreground: oklch(0.993 0.001 120.056);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.69 0.052 121.336);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.657 0.033 225.676);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.632 0.056 337.468);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.68 0.199 41.573);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.69 0.052 121.336);
  --chart-1: oklch(0.69 0.052 121.336);
  --chart-2: oklch(0.657 0.033 225.676);
  --chart-3: oklch(0.632 0.056 337.468);
  --chart-4: oklch(0.682 0.03 225.585);
  --chart-5: oklch(0.698 0.061 121.56);
}