Rudiment for shadcn/ui

Rudiment is a shadcn/ui theme built around a muted deep teal primary color (#1c2b28) with muted deep red accents (#2b1c20). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep teal primary (#1c2b28) on a teal-tinted background (#040c0a).

Color palette

TokenLightDark
Background
#ffffffwhite
#040c0ablack
Foreground
#02120eblack
#f9fbfbghostwhite
Card
#fcfcfcsnow
#05100dblack
Card foreground
#020e0bblack
#fcfdfdwhite
Popover
#ffffffwhite
#040c0ablack
Popover foreground
#02120eblack
#f9fbfbghostwhite
Primary
#1c2b28darkslategray
#1c2b28darkslategray
Primary foreground
#afcbc4silver
#afcbc4silver
Secondary
#2b1c20black
#2b1c20black
Secondary foreground
#cbafb5silver
#cbafb5silver
Muted
#f2edeewhitesmoke
#120d0eblack
Muted foreground
#483c3fdarkslategray
#c3b7basilver
Accent
#2b1c20black
#2b1c20black
Accent foreground
#cbafb5silver
#cbafb5silver
Destructive
#7c2404maroon
#f96934tomato
Destructive foreground
#fdc8b5peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1c2b28darkslategray
#1c2b28darkslategray

Contrast

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

Light mode
Text on background19.17:1AAA
Text on card19.19:1AAA
Primary button8.51:1AAA
Secondary button8.00:1AAA
Muted text9.09:1AAA
Accent8.00:1AAA
Destructive6.70:1AA
Dark mode
Text on background19.06:1AAA
Text on card19.00:1AAA
Primary button8.51:1AAA
Secondary button8.00:1AAA
Muted text9.93:1AAA
Accent8.00:1AAA
Destructive7.07:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.166 0.026 177.659);
  --muted: oklch(0.951 0.006 1.141);
  --muted-foreground: oklch(0.371 0.017 2.226);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.166 0.026 177.659);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.148 0.023 179.547);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.275 0.021 178.554);
  --primary-foreground: oklch(0.818 0.031 179.843);
  --secondary: oklch(0.248 0.024 3.611);
  --secondary-foreground: oklch(0.779 0.033 2.128);
  --accent: oklch(0.248 0.024 3.611);
  --accent-foreground: oklch(0.779 0.033 2.128);
  --destructive: oklch(0.395 0.127 37.377);
  --destructive-foreground: oklch(0.874 0.066 40.917);
  --ring: oklch(0.275 0.021 178.554);
  --chart-1: oklch(0.275 0.021 178.554);
  --chart-2: oklch(0.248 0.024 3.611);
  --chart-3: oklch(0.248 0.024 3.611);
  --chart-4: oklch(0.277 0.029 3.76);
  --chart-5: oklch(0.278 0.024 178.223);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.143 0.016 180.443);
  --foreground: oklch(0.986 0.003 180.884);
  --muted: oklch(0.165 0.01 2.573);
  --muted-foreground: oklch(0.789 0.014 1.454);
  --popover: oklch(0.143 0.016 180.443);
  --popover-foreground: oklch(0.986 0.003 180.884);
  --card: oklch(0.159 0.018 178.588);
  --card-foreground: oklch(0.993 0.001 180.922);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.275 0.021 178.554);
  --primary-foreground: oklch(0.818 0.031 179.843);
  --secondary: oklch(0.248 0.024 3.611);
  --secondary-foreground: oklch(0.779 0.033 2.128);
  --accent: oklch(0.248 0.024 3.611);
  --accent-foreground: oklch(0.779 0.033 2.128);
  --destructive: oklch(0.692 0.188 39.22);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.275 0.021 178.554);
  --chart-1: oklch(0.275 0.021 178.554);
  --chart-2: oklch(0.248 0.024 3.611);
  --chart-3: oklch(0.248 0.024 3.611);
  --chart-4: oklch(0.277 0.029 3.76);
  --chart-5: oklch(0.278 0.024 178.223);
}