Sweet vscode for shadcn/ui

Sweet vscode is a shadcn/ui theme built around a vivid purple primary color (#9700bd) with muted indigo accents (#3c3c5d). The light mode uses an indigo-tinted background (#1e1e2e). Dark mode keeps the vivid purple primary (#9700bd) on an indigo-tinted background (#1e1e2e).

Color palette

TokenLightDark
Background
#1e1e2edarkslategray
#1e1e2edarkslategray
Foreground
#ffffffwhite
#ffffffwhite
Card
#1a1a28black
#1a1a28black
Card foreground
#ffffffwhite
#ffffffwhite
Popover
#181825black
#181825black
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#9700bddarkviolet
#9700bddarkviolet
Primary foreground
#fcf0ffghostwhite
#fcf0ffghostwhite
Secondary
#cbacd2thistle
#cbacd2thistle
Secondary foreground
#2d1b32darkslategray
#2d1b32darkslategray
Muted
#2b2b36darkslategray
#2b2b36darkslategray
Muted foreground
#a6a6b9darkgray
#a6a6b9darkgray
Accent
#3c3c5ddarkslategray
#3c3c5ddarkslategray
Accent foreground
#e0e0ebgainsboro
#e0e0ebgainsboro
Destructive
#ff2b0aorangered
#ff2b0aorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#2d2d39darkslategray
#2d2d39darkslategray
Input
#343441darkslategray
#343441darkslategray
Ring
#9700bddarkviolet
#9700bddarkviolet

Contrast

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

Light mode
Text on background16.35:1AAA
Text on card17.14:1AAA
Primary button6.25:1AA
Secondary button7.89:1AAA
Muted text5.86:1AA
Accent7.98:1AAA
Destructive3.75:1AA Large
Dark mode
Text on background16.35:1AAA
Text on card17.14:1AAA
Primary button6.25:1AA
Secondary button7.89:1AAA
Muted text5.86:1AA
Accent7.98:1AAA
Destructive3.75:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.244 0.03 283.913);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.293 0.021 285.027);
  --muted-foreground: oklch(0.733 0.027 285.71);
  --popover: oklch(0.216 0.025 284.103);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.225 0.027 284.034);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.303 0.02 285.14);
  --input: oklch(0.331 0.023 285.098);
  --primary: oklch(0.501 0.245 316.62);
  --primary-foreground: oklch(0.968 0.024 319.451);
  --secondary: oklch(0.784 0.063 319.463);
  --secondary-foreground: oklch(0.256 0.049 319.432);
  --accent: oklch(0.372 0.055 283.423);
  --accent-foreground: oklch(0.91 0.014 286.109);
  --destructive: oklch(0.642 0.245 31.113);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.501 0.245 316.62);
  --chart-1: oklch(0.501 0.245 316.62);
  --chart-2: oklch(0.784 0.063 319.463);
  --chart-3: oklch(0.372 0.055 283.423);
  --chart-4: oklch(0.81 0.055 319.461);
  --chart-5: oklch(0.505 0.248 316.459);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.244 0.03 283.913);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.293 0.021 285.027);
  --muted-foreground: oklch(0.733 0.027 285.71);
  --popover: oklch(0.216 0.025 284.103);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.225 0.027 284.034);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.303 0.02 285.14);
  --input: oklch(0.331 0.023 285.098);
  --primary: oklch(0.501 0.245 316.62);
  --primary-foreground: oklch(0.968 0.024 319.451);
  --secondary: oklch(0.784 0.063 319.463);
  --secondary-foreground: oklch(0.256 0.049 319.432);
  --accent: oklch(0.372 0.055 283.423);
  --accent-foreground: oklch(0.91 0.014 286.109);
  --destructive: oklch(0.642 0.245 31.113);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.501 0.245 316.62);
  --chart-1: oklch(0.501 0.245 316.62);
  --chart-2: oklch(0.784 0.063 319.463);
  --chart-3: oklch(0.372 0.055 283.423);
  --chart-4: oklch(0.81 0.055 319.461);
  --chart-5: oklch(0.505 0.248 316.459);
}