Intent for shadcn/ui

Intent is a shadcn/ui theme built around a light purple primary color (#d9b5d7) with muted light purple accents (#e1dbe1). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the light purple primary (#d9b5d7) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#000000black
Foreground
#000000black
#f9f5f9whitesmoke
Card
#fcf8fcsnow
#000000black
Card foreground
#000000black
#f9f5f9whitesmoke
Popover
#fcf8fcsnow
#000000black
Popover foreground
#000000black
#f9f5f9whitesmoke
Primary
#d9b5d7thistle
#d9b5d7thistle
Primary foreground
#3d1f3bdarkslategray
#3d1f3bdarkslategray
Secondary
#e1dbe1gainsboro
#221b22black
Secondary foreground
#4b3f4adarkslategray
#c0afbfsilver
Muted
#f2e3f2lavender
#1c0d1bblack
Muted foreground
#6c5a6cdimgray
#a593a4darkgray
Accent
#e1dbe1gainsboro
#221b22black
Accent foreground
#4b3f4adarkslategray
#c0afbfsilver
Destructive
#982e01saddlebrown
#f44a01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d9b5d7thistle
#d9b5d7thistle

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button7.91:1AAA
Secondary button7.30:1AAA
Muted text5.13:1AA
Accent7.30:1AAA
Destructive7.68:1AAA
Dark mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button7.91:1AAA
Secondary button8.11:1AAA
Muted text6.51:1AA
Accent8.11:1AAA
Destructive3.61:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.008 327.11);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.932 0.026 327.29);
  --muted-foreground: oklch(0.493 0.035 327.668);
  --popover: oklch(0.983 0.008 327.11);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.008 327.11);
  --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.815 0.061 327.71);
  --primary-foreground: oklch(0.292 0.063 328.857);
  --secondary: oklch(0.897 0.01 327.141);
  --secondary-foreground: oklch(0.384 0.026 327.636);
  --accent: oklch(0.897 0.01 327.141);
  --accent-foreground: oklch(0.384 0.026 327.636);
  --destructive: oklch(0.459 0.149 38.298);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.815 0.061 327.71);
  --chart-1: oklch(0.815 0.061 327.71);
  --chart-2: oklch(0.897 0.01 327.141);
  --chart-3: oklch(0.897 0.01 327.141);
  --chart-4: oklch(0.921 0.008 327.115);
  --chart-5: oklch(0.814 0.067 327.772);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.975 0.007 327.105);
  --muted: oklch(0.187 0.037 328.728);
  --muted-foreground: oklch(0.683 0.032 327.463);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.975 0.007 327.105);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.975 0.007 327.105);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.815 0.061 327.71);
  --primary-foreground: oklch(0.292 0.063 328.857);
  --secondary: oklch(0.233 0.017 327.695);
  --secondary-foreground: oklch(0.774 0.03 327.388);
  --accent: oklch(0.233 0.017 327.695);
  --accent-foreground: oklch(0.774 0.03 327.388);
  --destructive: oklch(0.646 0.215 37.09);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.815 0.061 327.71);
  --chart-1: oklch(0.815 0.061 327.71);
  --chart-2: oklch(0.233 0.017 327.695);
  --chart-3: oklch(0.233 0.017 327.695);
  --chart-4: oklch(0.265 0.021 327.738);
  --chart-5: oklch(0.814 0.067 327.772);
}