Swivel for shadcn/ui

Swivel is a shadcn/ui theme built around a deep yellow primary color (#292814) with muted light yellow accents (#d2d1c6). The light mode uses a neutral background (#fdfcf7). Dark mode keeps the deep yellow primary (#292814) on a neutral background (#040401).

Color palette

TokenLightDark
Background
#fdfcf7snow
#040401black
Foreground
#100f05black
#fafaf4floralwhite
Card
#fdfcf7snow
#040401black
Card foreground
#100f05black
#fafaf4floralwhite
Popover
#fdfcf7snow
#040401black
Popover foreground
#100f05black
#fafaf4floralwhite
Primary
#292814black
#292814black
Primary foreground
#aea95bdarkkhaki
#aea95bdarkkhaki
Secondary
#d2d1c6lightgrey
#181816black
Secondary foreground
#39382ddarkslategray
#b5b4abdarkgray
Muted
#e0e0dcgainsboro
#23231fblack
Muted foreground
#474638darkslategray
#c7c6b8silver
Accent
#d2d1c6lightgrey
#181816black
Accent foreground
#39382ddarkslategray
#b5b4abdarkgray
Destructive
#9c0202darkred
#fb0909red
Destructive foreground
#fed2d2pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#292814black
#292814black

Contrast

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

Light mode
Text on background18.74:1AAA
Text on card18.74:1AAA
Primary button6.14:1AA
Secondary button7.68:1AAA
Muted text7.20:1AAA
Accent7.68:1AAA
Destructive6.34:1AA
Dark mode
Text on background19.60:1AAA
Text on card19.60:1AAA
Primary button6.14:1AA
Secondary button8.52:1AAA
Muted text9.13:1AAA
Accent8.52:1AAA
Destructive4.07:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.007 103.223);
  --foreground: oklch(0.165 0.021 105.275);
  --muted: oklch(0.905 0.006 103.215);
  --muted-foreground: oklch(0.392 0.023 104.036);
  --popover: oklch(0.991 0.007 103.223);
  --popover-foreground: oklch(0.165 0.021 105.275);
  --card: oklch(0.991 0.007 103.223);
  --card-foreground: oklch(0.165 0.021 105.275);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.271 0.033 104.827);
  --primary-foreground: oklch(0.721 0.1 105.005);
  --secondary: oklch(0.858 0.014 103.382);
  --secondary-foreground: oklch(0.337 0.018 103.939);
  --accent: oklch(0.858 0.014 103.382);
  --accent-foreground: oklch(0.337 0.018 103.939);
  --destructive: oklch(0.435 0.177 29.057);
  --destructive-foreground: oklch(0.901 0.05 18.125);
  --ring: oklch(0.271 0.033 104.827);
  --chart-1: oklch(0.271 0.033 104.827);
  --chart-2: oklch(0.858 0.014 103.382);
  --chart-3: oklch(0.858 0.014 103.382);
  --chart-4: oklch(0.88 0.012 103.334);
  --chart-5: oklch(0.274 0.035 104.906);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.103 0.014 106.012);
  --foreground: oklch(0.984 0.008 103.235);
  --muted: oklch(0.256 0.008 103.612);
  --muted-foreground: oklch(0.823 0.02 103.498);
  --popover: oklch(0.103 0.014 106.012);
  --popover-foreground: oklch(0.984 0.008 103.235);
  --card: oklch(0.103 0.014 106.012);
  --card-foreground: oklch(0.984 0.008 103.235);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.271 0.033 104.827);
  --primary-foreground: oklch(0.721 0.1 105.005);
  --secondary: oklch(0.209 0.005 103.497);
  --secondary-foreground: oklch(0.768 0.012 103.374);
  --accent: oklch(0.209 0.005 103.497);
  --accent-foreground: oklch(0.768 0.012 103.374);
  --destructive: oklch(0.623 0.253 29.009);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.271 0.033 104.827);
  --chart-1: oklch(0.271 0.033 104.827);
  --chart-2: oklch(0.209 0.005 103.497);
  --chart-3: oklch(0.209 0.005 103.497);
  --chart-4: oklch(0.243 0.006 103.535);
  --chart-5: oklch(0.274 0.035 104.906);
}