ansar for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card20.72:1AAA
Primary button7.96:1AAA
Secondary button12.53:1AAA
Muted text6.80:1AA
Accent19.38:1AAA
Destructive4.38:1AA Large
Dark mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button8.02:1AAA
Secondary button7.44:1AAA
Muted text6.24:1AA
Accent7.44:1AAA
Destructive4.81:1AA

CSS variables

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);
}