sf for shadcn/ui

sf is a shadcn/ui theme built around a vivid light indigo primary color (#9a9ffe) with vivid light violet accents (#c79afe). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the vivid light indigo primary (#9a9ffe) on an indigo-tinted background (#04040c).

Color palette

TokenLightDark
Background
#fcfcfdwhite
#04040cblack
Foreground
#040515black
#fcfcfdwhite
Card
#f8f8fcghostwhite
#050510black
Card foreground
#030411black
#ffffffwhite
Popover
#f8f8fcghostwhite
#050510black
Popover foreground
#030411black
#ffffffwhite
Primary
#9a9ffelightskyblue
#9a9ffelightskyblue
Primary foreground
#010665navy
#010665navy
Secondary
#9ad1felightskyblue
#9ad1felightskyblue
Secondary foreground
#013865midnightblue
#013865midnightblue
Muted
#d8dee3gainsboro
#1c2227black
Muted foreground
#3f4346darkslategray
#b9bdc0silver
Accent
#c79afeplum
#c79afeplum
Accent foreground
#2e0165midnightblue
#2e0165midnightblue
Destructive
#b30f09firebrick
#f2140dred
Destructive foreground
#fef1f0seashell
#ffffffwhite
Border
#e8e8e9lavender
#202122black
Input
#e8e8e9lavender
#202122black
Ring
#9a9ffelightskyblue
#9a9ffelightskyblue

Contrast

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

Light mode
Text on background19.67:1AAA
Text on card19.28:1AAA
Primary button7.21:1AAA
Secondary button7.36:1AAA
Muted text7.38:1AAA
Accent7.24:1AAA
Destructive6.35:1AA
Dark mode
Text on background19.93:1AAA
Text on card20.24:1AAA
Primary button7.21:1AAA
Secondary button7.36:1AAA
Muted text8.52:1AAA
Accent7.24:1AAA
Destructive4.29:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.002 283.931);
  --foreground: oklch(0.127 0.038 276.231);
  --muted: oklch(0.899 0.01 242.336);
  --muted-foreground: oklch(0.379 0.007 242.439);
  --popover: oklch(0.981 0.005 283.89);
  --popover-foreground: oklch(0.117 0.033 276.435);
  --card: oklch(0.981 0.005 283.89);
  --card-foreground: oklch(0.117 0.033 276.435);
  --border: oklch(0.93 0.001 283.95);
  --input: oklch(0.93 0.001 283.95);
  --primary: oklch(0.737 0.136 280.195);
  --primary-foreground: oklch(0.237 0.153 264.677);
  --secondary: oklch(0.839 0.085 243.71);
  --secondary-foreground: oklch(0.336 0.094 250.171);
  --accent: oklch(0.766 0.146 303.879);
  --accent-foreground: oklch(0.269 0.148 293.274);
  --destructive: oklch(0.487 0.193 29.169);
  --destructive-foreground: oklch(0.968 0.014 19.816);
  --ring: oklch(0.737 0.136 280.195);
  --chart-1: oklch(0.737 0.136 280.195);
  --chart-2: oklch(0.839 0.085 243.71);
  --chart-3: oklch(0.766 0.146 303.879);
  --chart-4: oklch(0.862 0.072 243.397);
  --chart-5: oklch(0.735 0.141 280.041);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.112 0.021 279.132);
  --foreground: oklch(0.992 0.001 283.955);
  --muted: oklch(0.247 0.013 242.924);
  --muted-foreground: oklch(0.796 0.006 242.291);
  --popover: oklch(0.124 0.024 279.084);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.124 0.024 279.084);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.246 0.002 283.804);
  --input: oklch(0.246 0.002 283.804);
  --primary: oklch(0.737 0.136 280.195);
  --primary-foreground: oklch(0.237 0.153 264.677);
  --secondary: oklch(0.839 0.085 243.71);
  --secondary-foreground: oklch(0.336 0.094 250.171);
  --accent: oklch(0.766 0.146 303.879);
  --accent-foreground: oklch(0.269 0.148 293.274);
  --destructive: oklch(0.609 0.243 29.249);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.737 0.136 280.195);
  --chart-1: oklch(0.737 0.136 280.195);
  --chart-2: oklch(0.839 0.085 243.71);
  --chart-3: oklch(0.766 0.146 303.879);
  --chart-4: oklch(0.862 0.072 243.397);
  --chart-5: oklch(0.735 0.141 280.041);
}