Virtual for shadcn/ui

Virtual is a shadcn/ui theme built around a green primary color (#a1d699) with red accents (#d699a1). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the green primary (#a1d699) on a neutral background (#030703).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#030703black
Foreground
#071505black
#ffffffwhite
Card
#f4fbf3whitesmoke
#050b04black
Card foreground
#051104black
#ffffffwhite
Popover
#f8fdf7mintcream
#030703black
Popover foreground
#071505black
#ffffffwhite
Primary
#a1d699lightgreen
#a1d699lightgreen
Primary foreground
#152c11black
#152c11black
Secondary
#99a1d6lightsteelblue
#99a1d6lightsteelblue
Secondary foreground
#11152cblack
#11152cblack
Muted
#e7e9f3lavender
#0c0e18black
Muted foreground
#5f616ddimgray
#9294a0lightslategray
Accent
#d699a1rosybrown
#d699a1rosybrown
Accent foreground
#2c1115black
#2c1115black
Destructive
#7e2807saddlebrown
#f35c20chocolate
Destructive foreground
#fbcdbbpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a1d699lightgreen
#a1d699lightgreen

Contrast

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

Light mode
Text on background18.18:1AAA
Text on card18.38:1AAA
Primary button9.01:1AAA
Secondary button7.22:1AAA
Muted text5.07:1AA
Accent7.45:1AAA
Destructive6.61:1AA
Dark mode
Text on background20.23:1AAA
Text on card19.87:1AAA
Primary button9.01:1AAA
Secondary button7.22:1AAA
Muted text6.39:1AA
Accent7.45:1AAA
Destructive6.37:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.009 141.567);
  --foreground: oklch(0.177 0.039 140.234);
  --muted: oklch(0.935 0.014 279.115);
  --muted-foreground: oklch(0.494 0.02 278.707);
  --popover: oklch(0.988 0.009 141.567);
  --popover-foreground: oklch(0.177 0.039 140.234);
  --card: oklch(0.982 0.013 141.554);
  --card-foreground: oklch(0.16 0.034 139.937);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.824 0.101 141.257);
  --primary-foreground: oklch(0.265 0.055 141.096);
  --secondary: oklch(0.722 0.078 277.479);
  --secondary-foreground: oklch(0.205 0.045 275.072);
  --accent: oklch(0.744 0.074 10.197);
  --accent-foreground: oklch(0.221 0.044 12.903);
  --destructive: oklch(0.405 0.125 38.56);
  --destructive-foreground: oklch(0.885 0.058 42.678);
  --ring: oklch(0.824 0.101 141.257);
  --chart-1: oklch(0.824 0.101 141.257);
  --chart-2: oklch(0.722 0.078 277.479);
  --chart-3: oklch(0.744 0.074 10.197);
  --chart-4: oklch(0.753 0.069 277.793);
  --chart-5: oklch(0.828 0.107 141.238);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.018 140.201);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.165 0.022 277.028);
  --muted-foreground: oklch(0.668 0.018 278.915);
  --popover: oklch(0.122 0.018 140.201);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.14 0.021 140.217);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.824 0.101 141.257);
  --primary-foreground: oklch(0.265 0.055 141.096);
  --secondary: oklch(0.722 0.078 277.479);
  --secondary-foreground: oklch(0.205 0.045 275.072);
  --accent: oklch(0.744 0.074 10.197);
  --accent-foreground: oklch(0.221 0.044 12.903);
  --destructive: oklch(0.666 0.198 39.17);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.824 0.101 141.257);
  --chart-1: oklch(0.824 0.101 141.257);
  --chart-2: oklch(0.722 0.078 277.479);
  --chart-3: oklch(0.744 0.074 10.197);
  --chart-4: oklch(0.753 0.069 277.793);
  --chart-5: oklch(0.828 0.107 141.238);
}