Sample is a shadcn/ui theme built around a vivid violet primary color (#7742eb) with muted light violet accents (#dcd9e3). The light mode uses a neutral background (#f9f7fd). Dark mode keeps the vivid violet primary (#7742eb) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #f9f7fdghostwhite | #000000black |
| Foreground | #040208black | #f7f6f9whitesmoke |
| Card | #f9f7fdghostwhite | #000000black |
| Card foreground | #040208black | #f7f6f9whitesmoke |
| Popover | #f9f7fdghostwhite | #000000black |
| Popover foreground | #040208black | #f7f6f9whitesmoke |
| Primary | #7742ebblueviolet | #7742ebblueviolet |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #dcd9e3gainsboro | #292432darkslategray |
| Secondary foreground | #413a50darkslategray | #c1bbcesilver |
| Muted | #eeecf4whitesmoke | #0e0b13black |
| Muted foreground | #413b4fdarkslategray | #b6b0c4silver |
| Accent | #dcd9e3gainsboro | #292432darkslategray |
| Accent foreground | #413a50darkslategray | #c1bbcesilver |
| Destructive | #df3c01orangered | #fe5f25tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7742ebblueviolet | #7742ebblueviolet |
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 | 5.57:1 | AA |
| Secondary button | 7.72:1 | AAA |
| Muted text | 9.13:1 | AAA |
| Accent | 7.72:1 | AAA |
| Destructive | 4.37:1 | AA Large |
| Text on background | 19.50:1 | AAA |
| Text on card | 19.50:1 | AAA |
| Primary button | 5.57:1 | AA |
| Secondary button | 8.06:1 | AAA |
| Muted text | 9.27:1 | AAA |
| Accent | 8.06:1 | AAA |
| Destructive | 6.86:1 | AA |
Paste this into your globals.css to use Sample in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.979 0.008 300.637);
--foreground: oklch(0.097 0.024 301.224);
--muted: oklch(0.947 0.011 300.585);
--muted-foreground: oklch(0.366 0.036 299.122);
--popover: oklch(0.979 0.008 300.637);
--popover-foreground: oklch(0.097 0.024 301.224);
--card: oklch(0.979 0.008 300.637);
--card-foreground: oklch(0.097 0.024 301.224);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.544 0.237 290.828);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.89 0.015 300.494);
--secondary-foreground: oklch(0.364 0.038 298.999);
--accent: oklch(0.89 0.015 300.494);
--accent-foreground: oklch(0.364 0.038 298.999);
--destructive: oklch(0.598 0.207 35.564);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.544 0.237 290.828);
--chart-1: oklch(0.544 0.237 290.828);
--chart-2: oklch(0.89 0.015 300.494);
--chart-3: oklch(0.89 0.015 300.494);
--chart-4: oklch(0.915 0.011 300.564);
--chart-5: oklch(0.542 0.243 290.274);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.975 0.004 300.708);
--muted: oklch(0.159 0.016 299.036);
--muted-foreground: oklch(0.769 0.03 300.125);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.975 0.004 300.708);
--card: oklch(0 0 0);
--card-foreground: oklch(0.975 0.004 300.708);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.544 0.237 290.828);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.273 0.026 299.176);
--secondary-foreground: oklch(0.803 0.027 300.215);
--accent: oklch(0.273 0.026 299.176);
--accent-foreground: oklch(0.803 0.027 300.215);
--destructive: oklch(0.686 0.205 38.303);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.544 0.237 290.828);
--chart-1: oklch(0.544 0.237 290.828);
--chart-2: oklch(0.273 0.026 299.176);
--chart-3: oklch(0.273 0.026 299.176);
--chart-4: oklch(0.301 0.03 299.109);
--chart-5: oklch(0.542 0.243 290.274);
}