Svelte for shadcn/ui

Svelte is a shadcn/ui theme built around a vivid light blue primary color (#b3def9) with vivid light blue accents (#b3bbf9). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light blue primary (#b3def9) on a neutral background (#030607).

Color palette

TokenLightDark
Background
#ffffffwhite
#030607black
Foreground
#030f17black
#fcfdfdwhite
Card
#ffffffwhite
#030607black
Card foreground
#030f17black
#fcfdfdwhite
Popover
#ffffffwhite
#030607black
Popover foreground
#030f17black
#fcfdfdwhite
Primary
#b3def9powderblue
#b3def9powderblue
Primary foreground
#094972midnightblue
#094972midnightblue
Secondary
#b3f9f1paleturquoise
#b3f9f1paleturquoise
Secondary foreground
#011311black
#011311black
Muted
#e4f2f0lavender
#0d1b1ablack
Muted foreground
#4c6764dimgray
#98b3b0darkgray
Accent
#b3bbf9lightsteelblue
#b3bbf9lightsteelblue
Accent foreground
#091572midnightblue
#091572midnightblue
Destructive
#87200ddarkred
#da3316firebrick
Destructive foreground
#fad3ccbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b3def9powderblue
#b3def9powderblue

Contrast

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

Light mode
Text on background19.36:1AAA
Text on card19.36:1AAA
Primary button6.69:1AA
Secondary button16.12:1AAA
Muted text5.30:1AA
Accent8.38:1AAA
Destructive6.83:1AA
Dark mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button6.69:1AA
Secondary button16.12:1AAA
Muted text7.89:1AAA
Accent8.38:1AAA
Destructive4.69:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.16 0.026 233.946);
  --muted: oklch(0.949 0.015 188.537);
  --muted-foreground: oklch(0.49 0.032 187.284);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.16 0.026 233.946);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.16 0.026 233.946);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.88 0.059 235.619);
  --primary-foreground: oklch(0.392 0.091 243.412);
  --secondary: oklch(0.934 0.07 187.008);
  --secondary-foreground: oklch(0.169 0.027 185.848);
  --accent: oklch(0.809 0.088 278.399);
  --accent-foreground: oklch(0.276 0.155 266.617);
  --destructive: oklch(0.411 0.141 32.29);
  --destructive-foreground: oklch(0.898 0.045 29.729);
  --ring: oklch(0.88 0.059 235.619);
  --chart-1: oklch(0.88 0.059 235.619);
  --chart-2: oklch(0.934 0.07 187.008);
  --chart-3: oklch(0.809 0.088 278.399);
  --chart-4: oklch(0.946 0.058 187.386);
  --chart-5: oklch(0.88 0.06 235.665);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.009 229.301);
  --foreground: oklch(0.992 0.001 234.528);
  --muted: oklch(0.21 0.02 186.481);
  --muted-foreground: oklch(0.746 0.03 187.944);
  --popover: oklch(0.116 0.009 229.301);
  --popover-foreground: oklch(0.992 0.001 234.528);
  --card: oklch(0.116 0.009 229.301);
  --card-foreground: oklch(0.992 0.001 234.528);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.88 0.059 235.619);
  --primary-foreground: oklch(0.392 0.091 243.412);
  --secondary: oklch(0.934 0.07 187.008);
  --secondary-foreground: oklch(0.169 0.027 185.848);
  --accent: oklch(0.809 0.088 278.399);
  --accent-foreground: oklch(0.276 0.155 266.617);
  --destructive: oklch(0.582 0.207 32.136);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.88 0.059 235.619);
  --chart-1: oklch(0.88 0.059 235.619);
  --chart-2: oklch(0.934 0.07 187.008);
  --chart-3: oklch(0.809 0.088 278.399);
  --chart-4: oklch(0.946 0.058 187.386);
  --chart-5: oklch(0.88 0.06 235.665);
}