Viola is a shadcn/ui theme built around a deep green primary color (#54661a) with deep indigo accents (#2b1a66). The light mode uses a neutral background (#fdfefb). Dark mode keeps the deep green primary (#54661a) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfefbwhite | #000000black |
| Foreground | #0a0c04black | #ffffffwhite |
| Card | #fdfefbwhite | #000000black |
| Card foreground | #0a0c04black | #ffffffwhite |
| Popover | #fdfefbwhite | #000000black |
| Popover foreground | #0a0c04black | #ffffffwhite |
| Primary | #54661adarkolivegreen | #54661adarkolivegreen |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #2b1a66midnightblue | #2b1a66midnightblue |
| Secondary foreground | #cdc2f0thistle | #cdc2f0thistle |
| Muted | #dfdde3gainsboro | #1d1c22black |
| Muted foreground | #646369dimgray | #97969cdarkgray |
| Accent | #2b1a66midnightblue | #2b1a66midnightblue |
| Accent foreground | #cdc2f0thistle | #cdc2f0thistle |
| Destructive | #c82104firebrick | #fa320forangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #54661adarkolivegreen | #54661adarkolivegreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.41:1 | AAA |
| Text on card | 19.41:1 | AAA |
| Primary button | 6.37:1 | AA |
| Secondary button | 8.73:1 | AAA |
| Muted text | 4.42:1 | AA Large |
| Accent | 8.73:1 | AAA |
| Destructive | 5.70:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 6.37:1 | AA |
| Secondary button | 8.73:1 | AAA |
| Muted text | 5.78:1 | AA |
| Accent | 8.73:1 | AAA |
| Destructive | 3.79:1 | AA Large |
Paste this into your globals.css to use Viola in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.003 117.142);
--foreground: oklch(0.147 0.019 117.616);
--muted: oklch(0.901 0.008 296.912);
--muted-foreground: oklch(0.503 0.01 296.731);
--popover: oklch(0.995 0.003 117.142);
--popover-foreground: oklch(0.147 0.019 117.616);
--card: oklch(0.995 0.003 117.142);
--card-foreground: oklch(0.147 0.019 117.616);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.48 0.102 121.856);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.293 0.126 286.503);
--secondary-foreground: oklch(0.837 0.064 295.673);
--accent: oklch(0.293 0.126 286.503);
--accent-foreground: oklch(0.837 0.064 295.673);
--destructive: oklch(0.535 0.203 31.591);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.48 0.102 121.856);
--chart-1: oklch(0.48 0.102 121.856);
--chart-2: oklch(0.293 0.126 286.503);
--chart-3: oklch(0.293 0.126 286.503);
--chart-4: oklch(0.315 0.138 286.19);
--chart-5: oklch(0.485 0.106 122.054);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.229 0.012 296.138);
--muted-foreground: oklch(0.676 0.009 296.839);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.48 0.102 121.856);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.293 0.126 286.503);
--secondary-foreground: oklch(0.837 0.064 295.673);
--accent: oklch(0.293 0.126 286.503);
--accent-foreground: oklch(0.837 0.064 295.673);
--destructive: oklch(0.638 0.236 31.782);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.48 0.102 121.856);
--chart-1: oklch(0.48 0.102 121.856);
--chart-2: oklch(0.293 0.126 286.503);
--chart-3: oklch(0.293 0.126 286.503);
--chart-4: oklch(0.315 0.138 286.19);
--chart-5: oklch(0.485 0.106 122.054);
}