ansar is a shadcn/ui theme built around a vivid teal primary color (#0ab2ab) with light teal accents (#e9f9f8). The light mode uses a neutral background (#ffffff). Dark mode switches to a muted light violet primary (#ccc6d7) on a neutral background (#020104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020104black |
| Foreground | #000000black | #faf9fbghostwhite |
| Card | #ffffffwhite | #020104black |
| Card foreground | #040109black | #faf9fbghostwhite |
| Popover | #ffffffwhite | #020104black |
| Popover foreground | #000000black | #faf9fbghostwhite |
| Primary | #0ab2ablightseagreen | #ccc6d7thistle |
| Primary foreground | #000000black | #332c3fdarkslategray |
| Secondary | #1f3835darkslategray | #d1d7c6lightgrey |
| Secondary foreground | #ffffffwhite | #383f2cdarkslategray |
| Muted | #f8f8f8whitesmoke | #292f1ddarkslategray |
| Muted foreground | #4f5959dimgray | #acb0a6darkgray |
| Accent | #e9f9f8aliceblue | #d1d7c6lightgrey |
| Accent foreground | #000000black | #383f2cdarkslategray |
| Destructive | #ed1c24crimson | #e01d10crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #19161dblack |
| Input | #e6e6e6gainsboro | #19161dblack |
| Ring | #e9f9f8aliceblue | #ccc6d7thistle |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.72:1 | AAA |
| Primary button | 7.96:1 | AAA |
| Secondary button | 12.53:1 | AAA |
| Muted text | 6.80:1 | AA |
| Accent | 19.38:1 | AAA |
| Destructive | 4.38:1 | AA Large |
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 8.02:1 | AAA |
| Secondary button | 7.44:1 | AAA |
| Muted text | 6.24:1 | AA |
| Accent | 7.44:1 | AAA |
| Destructive | 4.81:1 | AA |
Paste this into your globals.css to use ansar in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.979 0 173.29);
--muted-foreground: oklch(0.456 0.013 191.783);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--card-foreground: oklch(0.095 0.029 304.098);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.925 0 180);
--primary: oklch(0.689 0.118 189.783);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.319 0.032 186.05);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.97 0.017 193.859);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.603 0.235 26.986);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.97 0.017 192.364);
--chart-1: oklch(0.835 0.097 195.456);
--chart-2: oklch(0.594 0.061 207.155);
--chart-3: oklch(0.277 0.039 245.25);
--chart-4: oklch(0.348 0.059 199.859);
--chart-5: oklch(0.705 0.146 165.527);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.013 303.548);
--foreground: oklch(0.983 0.003 302.881);
--muted: oklch(0.295 0.033 124.74);
--muted-foreground: oklch(0.751 0.015 123.23);
--popover: oklch(0.082 0.013 303.548);
--popover-foreground: oklch(0.983 0.003 302.881);
--card: oklch(0.082 0.013 303.548);
--card-foreground: oklch(0.983 0.003 302.881);
--border: oklch(0.207 0.013 301.934);
--input: oklch(0.207 0.013 301.934);
--primary: oklch(0.836 0.025 302.474);
--primary-foreground: oklch(0.309 0.035 301.16);
--secondary: oklch(0.87 0.025 123.363);
--secondary-foreground: oklch(0.356 0.033 124.419);
--accent: oklch(0.87 0.025 123.363);
--accent-foreground: oklch(0.356 0.033 124.419);
--destructive: oklch(0.579 0.225 29.741);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.836 0.025 302.474);
--chart-1: oklch(0.836 0.025 302.474);
--chart-2: oklch(0.87 0.025 123.363);
--chart-3: oklch(0.87 0.025 123.363);
--chart-4: oklch(0.891 0.021 123.283);
--chart-5: oklch(0.834 0.029 302.396);
}