Elastic for shadcn/ui

Elastic is a shadcn/ui theme built around a muted orange primary color (#846358) with muted yellow accents (#847958). The light mode uses a neutral background (#fefcfb). Dark mode keeps the muted orange primary (#846358) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefcfbsnow
#000000black
Foreground
#040201black
#fbf9f9snow
Card
#fdf8f7snow
#030303black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fefcfbsnow
#000000black
Popover foreground
#040201black
#fbf9f9snow
Primary
#846358dimgray
#846358dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#845862dimgray
#845862dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ead6dbgainsboro
#291519black
Muted foreground
#544f50darkslategray
#b0abacdarkgray
Accent
#847958dimgray
#847958dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#82200dmaroon
#df3716orangered
Destructive foreground
#f9d0c7pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#846358dimgray
#846358dimgray

Contrast

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

Light mode
Text on background20.20:1AAA
Text on card19.99:1AAA
Primary button5.36:1AA
Secondary button5.93:1AA
Muted text5.81:1AA
Accent4.31:1AA Large
Destructive6.87:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.19:1AAA
Primary button5.36:1AA
Secondary button5.93:1AA
Muted text7.65:1AAA
Accent4.31:1AA Large
Destructive4.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 41.282);
  --foreground: oklch(0.089 0.01 48.755);
  --muted: oklch(0.895 0.023 1.674);
  --muted-foreground: oklch(0.433 0.007 1.389);
  --popover: oklch(0.992 0.003 41.282);
  --popover-foreground: oklch(0.089 0.01 48.755);
  --card: oklch(0.983 0.006 41.259);
  --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.53 0.046 40.886);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.51 0.06 4.115);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.578 0.05 93.17);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.403 0.136 32.999);
  --destructive-foreground: oklch(0.89 0.049 31.251);
  --ring: oklch(0.53 0.046 40.886);
  --chart-1: oklch(0.53 0.046 40.886);
  --chart-2: oklch(0.51 0.06 4.115);
  --chart-3: oklch(0.578 0.05 93.17);
  --chart-4: oklch(0.535 0.063 4.141);
  --chart-5: oklch(0.53 0.053 40.85);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.002 41.29);
  --muted: oklch(0.224 0.034 5.082);
  --muted-foreground: oklch(0.745 0.006 1.178);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.002 41.29);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 41.298);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.53 0.046 40.886);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.51 0.06 4.115);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.578 0.05 93.17);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.594 0.208 32.756);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.53 0.046 40.886);
  --chart-1: oklch(0.53 0.046 40.886);
  --chart-2: oklch(0.51 0.06 4.115);
  --chart-3: oklch(0.578 0.05 93.17);
  --chart-4: oklch(0.535 0.063 4.141);
  --chart-5: oklch(0.53 0.053 40.85);
}