Trim for shadcn/ui

Trim is a shadcn/ui theme built around a muted blue primary color (#aeb8c2) with muted orange accents (#c2b7ae). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted blue primary (#aeb8c2) on a neutral background (#030507).

Color palette

TokenLightDark
Background
#ffffffwhite
#030507black
Foreground
#010304black
#ffffffwhite
Card
#fcfcfcsnow
#04080bblack
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#030507black
Popover foreground
#010304black
#ffffffwhite
Primary
#aeb8c2silver
#aeb8c2silver
Primary foreground
#1a1f23black
#1a1f23black
Secondary
#c2b7aesilver
#c2b7aesilver
Secondary foreground
#231e1ablack
#231e1ablack
Muted
#f2eae3linen
#1c140dblack
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#c2b7aesilver
#c2b7aesilver
Accent foreground
#231e1ablack
#231e1ablack
Destructive
#8b3104saddlebrown
#f25607orangered
Destructive foreground
#fdd7c4peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#aeb8c2silver
#aeb8c2silver

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.54:1AAA
Primary button8.26:1AAA
Secondary button8.37:1AAA
Muted text7.81:1AAA
Accent8.37:1AAA
Destructive6.20:1AA
Dark mode
Text on background20.39:1AAA
Text on card20.10:1AAA
Primary button8.26:1AAA
Secondary button8.37:1AAA
Muted text9.17:1AAA
Accent8.37:1AAA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.09 0.009 236.67);
  --muted: oklch(0.942 0.012 63.925);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.09 0.009 236.67);
  --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.778 0.018 244.374);
  --primary-foreground: oklch(0.236 0.01 244.633);
  --secondary: oklch(0.785 0.018 63.797);
  --secondary-foreground: oklch(0.24 0.01 63.517);
  --accent: oklch(0.785 0.018 63.797);
  --accent-foreground: oklch(0.24 0.01 63.517);
  --destructive: oklch(0.438 0.131 41.168);
  --destructive-foreground: oklch(0.906 0.05 48.144);
  --ring: oklch(0.778 0.018 244.374);
  --chart-1: oklch(0.778 0.018 244.374);
  --chart-2: oklch(0.785 0.018 63.797);
  --chart-3: oklch(0.785 0.018 63.797);
  --chart-4: oklch(0.809 0.016 63.839);
  --chart-5: oklch(0.777 0.022 244.435);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.114 0.009 238.156);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.198 0.018 62.702);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.114 0.009 238.156);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.13 0.011 238.338);
  --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.778 0.018 244.374);
  --primary-foreground: oklch(0.236 0.01 244.633);
  --secondary: oklch(0.785 0.018 63.797);
  --secondary-foreground: oklch(0.24 0.01 63.517);
  --accent: oklch(0.785 0.018 63.797);
  --accent-foreground: oklch(0.24 0.01 63.517);
  --destructive: oklch(0.657 0.204 39.801);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.778 0.018 244.374);
  --chart-1: oklch(0.778 0.018 244.374);
  --chart-2: oklch(0.785 0.018 63.797);
  --chart-3: oklch(0.785 0.018 63.797);
  --chart-4: oklch(0.809 0.016 63.839);
  --chart-5: oklch(0.777 0.022 244.435);
}