Swivel for shadcn/ui

Swivel is a shadcn/ui theme built around a near-white primary color (#f9fafa) with near-white accents (#fafaf9). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the near-white primary (#f9fafa) on a blue-tinted background (#06080f).

Color palette

TokenLightDark
Background
#fbfcfewhite
#06080fblack
Foreground
#000000black
#f6f7f8whitesmoke
Card
#f7f8fdghostwhite
#070a13black
Card foreground
#000000black
#f9fafbghostwhite
Popover
#f7f8fdghostwhite
#070a13black
Popover foreground
#000000black
#f9fafbghostwhite
Primary
#f9fafaghostwhite
#f9fafaghostwhite
Primary foreground
#565c6cdimgray
#565c6cdimgray
Secondary
#fafaf9snow
#fafaf9snow
Secondary foreground
#333029darkslategray
#333029darkslategray
Muted
#f4f0e7linen
#18150bblack
Muted foreground
#555144darkolivegreen
#bbb7aadarkgray
Accent
#fafaf9snow
#fafaf9snow
Accent foreground
#333029darkslategray
#333029darkslategray
Destructive
#87200ddarkred
#d13115firebrick
Destructive foreground
#fad3ccbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9fafaghostwhite
#f9fafaghostwhite

Contrast

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

Light mode
Text on background20.41:1AAA
Text on card19.83:1AAA
Primary button6.38:1AA
Secondary button12.62:1AAA
Muted text6.99:1AA
Accent12.62:1AAA
Destructive6.83:1AA
Dark mode
Text on background18.68:1AAA
Text on card18.94:1AAA
Primary button6.38:1AA
Secondary button12.62:1AAA
Muted text9.07:1AAA
Accent12.62:1AAA
Destructive5.05:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 271.379);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.956 0.014 91.529);
  --muted-foreground: oklch(0.434 0.021 91.742);
  --popover: oklch(0.98 0.006 271.348);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.98 0.006 271.348);
  --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.984 0.001 271.398);
  --primary-foreground: oklch(0.474 0.027 270.801);
  --secondary: oklch(0.986 0.001 91.419);
  --secondary-foreground: oklch(0.311 0.014 91.722);
  --accent: oklch(0.986 0.001 91.419);
  --accent-foreground: oklch(0.311 0.014 91.722);
  --destructive: oklch(0.411 0.141 32.29);
  --destructive-foreground: oklch(0.898 0.045 29.729);
  --ring: oklch(0.984 0.001 271.398);
  --chart-1: oklch(0.984 0.001 271.398);
  --chart-2: oklch(0.986 0.001 91.419);
  --chart-3: oklch(0.986 0.001 91.419);
  --chart-4: oklch(1.007 0.001 271.404);
  --chart-5: oklch(0.984 0.001 271.395);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.017 266.772);
  --foreground: oklch(0.976 0.002 271.39);
  --muted: oklch(0.197 0.019 91.781);
  --muted-foreground: oklch(0.778 0.018 91.598);
  --popover: oklch(0.145 0.02 268.19);
  --popover-foreground: oklch(0.984 0.001 271.396);
  --card: oklch(0.145 0.02 268.19);
  --card-foreground: oklch(0.984 0.001 271.396);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.984 0.001 271.398);
  --primary-foreground: oklch(0.474 0.027 270.801);
  --secondary: oklch(0.986 0.001 91.419);
  --secondary-foreground: oklch(0.311 0.014 91.722);
  --accent: oklch(0.986 0.001 91.419);
  --accent-foreground: oklch(0.311 0.014 91.722);
  --destructive: oklch(0.564 0.2 32.15);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.984 0.001 271.398);
  --chart-1: oklch(0.984 0.001 271.398);
  --chart-2: oklch(0.986 0.001 91.419);
  --chart-3: oklch(0.986 0.001 91.419);
  --chart-4: oklch(1.007 0.001 271.404);
  --chart-5: oklch(0.984 0.001 271.395);
}