Similar for shadcn/ui

Similar is a shadcn/ui theme built around a light orange primary color (#efe5dc) with near-white accents (#e8e8e8). The light mode uses a neutral background (#fdfaf7). Dark mode keeps the light orange primary (#efe5dc) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfaf7snow
#000000black
Foreground
#120a02black
#ffffffwhite
Card
#fbf7f3floralwhite
#030303black
Card foreground
#0e0702black
#ffffffwhite
Popover
#fbf7f3floralwhite
#030303black
Popover foreground
#0e0702black
#ffffffwhite
Primary
#efe5dcantiquewhite
#efe5dcantiquewhite
Primary foreground
#694b30darkolivegreen
#694b30darkolivegreen
Secondary
#e8e8e8lavender
#2c2926darkslategray
Secondary foreground
#504f4edarkslategray
#c6c2besilver
Muted
#e7ddd4gainsboro
#2b2118black
Muted foreground
#55514edarkslategray
#b1adaadarkgray
Accent
#e8e8e8lavender
#2c2926darkslategray
Accent foreground
#504f4edarkslategray
#c6c2besilver
Destructive
#7f2a0bsaddlebrown
#ec5c27chocolate
Destructive foreground
#fad1c2peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#efe5dcantiquewhite
#efe5dcantiquewhite

Contrast

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

Light mode
Text on background18.82:1AAA
Text on card18.79:1AAA
Primary button6.37:1AA
Secondary button6.67:1AA
Muted text5.88:1AA
Accent6.67:1AA
Destructive6.70:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button6.37:1AA
Secondary button8.20:1AAA
Muted text7.10:1AAA
Accent8.20:1AAA
Destructive6.12:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.005 64.031);
  --foreground: oklch(0.152 0.024 70.53);
  --muted: oklch(0.904 0.017 63.855);
  --muted-foreground: oklch(0.439 0.007 63.893);
  --popover: oklch(0.979 0.007 64.001);
  --popover-foreground: oklch(0.137 0.021 74.23);
  --card: oklch(0.979 0.007 64.001);
  --card-foreground: oklch(0.137 0.021 74.23);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.927 0.016 63.867);
  --primary-foreground: oklch(0.438 0.057 61.667);
  --secondary: oklch(0.931 0 64.084);
  --secondary-foreground: oklch(0.428 0.002 64.041);
  --accent: oklch(0.931 0 64.084);
  --accent-foreground: oklch(0.428 0.002 64.041);
  --destructive: oklch(0.408 0.124 38.093);
  --destructive-foreground: oklch(0.891 0.05 40.98);
  --ring: oklch(0.927 0.016 63.867);
  --chart-1: oklch(0.927 0.016 63.867);
  --chart-2: oklch(0.931 0 64.084);
  --chart-3: oklch(0.931 0 64.084);
  --chart-4: oklch(0.954 0 64.086);
  --chart-5: oklch(0.927 0.017 63.848);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.255 0.023 62.732);
  --muted-foreground: oklch(0.75 0.006 63.99);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --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.927 0.016 63.867);
  --primary-foreground: oklch(0.438 0.057 61.667);
  --secondary: oklch(0.282 0.007 63.788);
  --secondary-foreground: oklch(0.815 0.008 63.972);
  --accent: oklch(0.282 0.007 63.788);
  --accent-foreground: oklch(0.815 0.008 63.972);
  --destructive: oklch(0.655 0.19 38.678);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.927 0.016 63.867);
  --chart-1: oklch(0.927 0.016 63.867);
  --chart-2: oklch(0.282 0.007 63.788);
  --chart-3: oklch(0.282 0.007 63.788);
  --chart-4: oklch(0.313 0.008 63.775);
  --chart-5: oklch(0.927 0.017 63.848);
}