Swift for shadcn/ui

Swift is a shadcn/ui theme built around a vivid light red primary color (#f5a3b2) with neutral gray accents (#d5d3d3). The light mode uses a neutral background (#fefbfc). Dark mode keeps the vivid light red primary (#f5a3b2) on a neutral background (#040102).

Color palette

TokenLightDark
Background
#fefbfcsnow
#040102black
Foreground
#160407black
#fdfcfcsnow
Card
#fefbfcsnow
#040102black
Card foreground
#160407black
#fdfcfcsnow
Popover
#fefbfcsnow
#040102black
Popover foreground
#160407black
#fdfcfcsnow
Primary
#f5a3b2lightpink
#f5a3b2lightpink
Primary foreground
#5c0a19maroon
#5c0a19maroon
Secondary
#d5d3d3lightgrey
#33292bdarkslategray
Secondary foreground
#3c393adarkslategray
#cdc1c3silver
Muted
#ebe0e2gainsboro
#1f1416black
Muted foreground
#4a4a4adarkslategray
#b5b5b5silver
Accent
#d5d3d3lightgrey
#33292bdarkslategray
Accent foreground
#3c393adarkslategray
#cdc1c3silver
Destructive
#c03807firebrick
#f86935tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f5a3b2lightpink
#f5a3b2lightpink

Contrast

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

Light mode
Text on background19.35:1AAA
Text on card19.35:1AAA
Primary button7.12:1AAA
Secondary button7.64:1AAA
Muted text6.88:1AA
Accent7.64:1AAA
Destructive5.50:1AA
Dark mode
Text on background20.26:1AAA
Text on card20.26:1AAA
Primary button7.12:1AAA
Secondary button8.06:1AAA
Muted text8.74:1AAA
Accent8.06:1AAA
Destructive7.05:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 4.398);
  --foreground: oklch(0.143 0.036 7.91);
  --muted: oklch(0.917 0.011 4.64);
  --muted-foreground: oklch(0.409 0 190.305);
  --popover: oklch(0.99 0.003 4.398);
  --popover-foreground: oklch(0.143 0.036 7.91);
  --card: oklch(0.99 0.003 4.398);
  --card-foreground: oklch(0.143 0.036 7.91);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.8 0.098 7.519);
  --primary-foreground: oklch(0.309 0.112 17.996);
  --secondary: oklch(0.868 0.002 4.371);
  --secondary-foreground: oklch(0.349 0.003 4.564);
  --accent: oklch(0.868 0.002 4.371);
  --accent-foreground: oklch(0.349 0.003 4.564);
  --destructive: oklch(0.54 0.179 36.451);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.8 0.098 7.519);
  --chart-1: oklch(0.8 0.098 7.519);
  --chart-2: oklch(0.868 0.002 4.371);
  --chart-3: oklch(0.868 0.002 4.371);
  --chart-4: oklch(0.891 0.002 4.359);
  --chart-5: oklch(0.799 0.102 7.653);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.011 4.62);
  --foreground: oklch(0.992 0.001 4.338);
  --muted: oklch(0.207 0.017 6.45);
  --muted-foreground: oklch(0.773 0 180);
  --popover: oklch(0.085 0.011 4.62);
  --popover-foreground: oklch(0.992 0.001 4.338);
  --card: oklch(0.085 0.011 4.62);
  --card-foreground: oklch(0.992 0.001 4.338);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.8 0.098 7.519);
  --primary-foreground: oklch(0.309 0.112 17.996);
  --secondary: oklch(0.292 0.015 5.675);
  --secondary-foreground: oklch(0.821 0.014 4.768);
  --accent: oklch(0.292 0.015 5.675);
  --accent-foreground: oklch(0.821 0.014 4.768);
  --destructive: oklch(0.691 0.187 39.28);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.8 0.098 7.519);
  --chart-1: oklch(0.8 0.098 7.519);
  --chart-2: oklch(0.292 0.015 5.675);
  --chart-3: oklch(0.292 0.015 5.675);
  --chart-4: oklch(0.322 0.017 5.724);
  --chart-5: oklch(0.799 0.102 7.653);
}