Viola for shadcn/ui

Viola is a shadcn/ui theme built around a deep cyan primary color (#1f3b42) with muted light cyan accents (#e6e9ea). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep cyan primary (#1f3b42) on a cyan-tinted background (#05090a).

Color palette

TokenLightDark
Background
#ffffffwhite
#05090ablack
Foreground
#000000black
#fcfdfdwhite
Card
#fcfcfcsnow
#070c0dblack
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#05090ablack
Popover foreground
#000000black
#fcfdfdwhite
Primary
#1f3b42darkslategray
#1f3b42darkslategray
Primary foreground
#b6d5ddlightblue
#b6d5ddlightblue
Secondary
#e6e9ealavender
#2a2c2ddarkslategray
Secondary foreground
#495355darkslategray
#c2c6c7silver
Muted
#e7edeelavender
#111718black
Muted foreground
#3d4d51darkslategray
#aebec2silver
Accent
#e6e9ealavender
#2a2c2ddarkslategray
Accent foreground
#495355darkslategray
#c2c6c7silver
Destructive
#6b1c0bmaroon
#ec5c3ctomato
Destructive foreground
#f7bdb0lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1f3b42darkslategray
#1f3b42darkslategray

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.54:1AAA
Primary button7.67:1AAA
Secondary button6.49:1AA
Muted text7.45:1AAA
Accent6.49:1AA
Destructive7.16:1AAA
Dark mode
Text on background19.61:1AAA
Text on card19.65:1AAA
Primary button7.67:1AAA
Secondary button8.12:1AAA
Muted text9.46:1AAA
Accent8.12:1AAA
Destructive6.16:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.942 0.007 214.337);
  --muted-foreground: oklch(0.409 0.021 214.618);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.334 0.037 215.721);
  --primary-foreground: oklch(0.853 0.035 214.522);
  --secondary: oklch(0.932 0.003 214.326);
  --secondary-foreground: oklch(0.434 0.014 214.447);
  --accent: oklch(0.932 0.003 214.326);
  --accent-foreground: oklch(0.434 0.014 214.447);
  --destructive: oklch(0.354 0.115 33.865);
  --destructive-foreground: oklch(0.848 0.07 32.921);
  --ring: oklch(0.334 0.037 215.721);
  --chart-1: oklch(0.334 0.037 215.721);
  --chart-2: oklch(0.932 0.003 214.326);
  --chart-3: oklch(0.932 0.003 214.326);
  --chart-4: oklch(0.955 0.002 214.323);
  --chart-5: oklch(0.336 0.039 215.932);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.008 211.8);
  --foreground: oklch(0.993 0.001 214.32);
  --muted: oklch(0.198 0.01 214.6);
  --muted-foreground: oklch(0.789 0.019 214.402);
  --popover: oklch(0.136 0.008 211.8);
  --popover-foreground: oklch(0.993 0.001 214.32);
  --card: oklch(0.15 0.009 213.707);
  --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.334 0.037 215.721);
  --primary-foreground: oklch(0.853 0.035 214.522);
  --secondary: oklch(0.292 0.004 214.36);
  --secondary-foreground: oklch(0.823 0.004 214.331);
  --accent: oklch(0.292 0.004 214.36);
  --accent-foreground: oklch(0.823 0.004 214.331);
  --destructive: oklch(0.657 0.184 34.152);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.334 0.037 215.721);
  --chart-1: oklch(0.334 0.037 215.721);
  --chart-2: oklch(0.292 0.004 214.36);
  --chart-3: oklch(0.292 0.004 214.36);
  --chart-4: oklch(0.323 0.005 214.362);
  --chart-5: oklch(0.336 0.039 215.932);
}