Anchored for shadcn/ui

Anchored is a shadcn/ui theme built around a purple primary color (#dd86df) with neutral gray accents (#e7e4e7). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#dd86df) on a purple-tinted background (#0e070e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e070eblack
Foreground
#080208black
#ffffffwhite
Card
#fcfcfcsnow
#110811black
Card foreground
#040104black
#ffffffwhite
Popover
#ffffffwhite
#0e070eblack
Popover foreground
#080208black
#ffffffwhite
Primary
#dd86dfviolet
#dd86dfviolet
Primary foreground
#280b28black
#280b28black
Secondary
#e7e4e7gainsboro
#231a23black
Secondary foreground
#504950darkslategray
#c1aec2silver
Muted
#ebe0eblavender
#1f141fblack
Muted foreground
#444144darkslategray
#bebbbesilver
Accent
#e7e4e7gainsboro
#231a23black
Accent foreground
#504950darkslategray
#c1aec2silver
Destructive
#701100maroon
#ff3c19orangered
Destructive foreground
#ffb1a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dd86dfviolet
#dd86dfviolet

Contrast

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

Light mode
Text on background20.53:1AAA
Text on card20.31:1AAA
Primary button7.33:1AAA
Secondary button6.91:1AA
Muted text7.84:1AAA
Accent6.91:1AA
Destructive6.81:1AA
Dark mode
Text on background19.94:1AAA
Text on card19.65:1AAA
Primary button7.33:1AAA
Secondary button8.11:1AAA
Muted text9.38:1AAA
Accent8.11:1AAA
Destructive3.55:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.109 0.023 326.554);
  --muted: oklch(0.918 0.02 325.251);
  --muted-foreground: oklch(0.379 0.006 325.203);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.109 0.023 326.554);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.087 0.018 326.554);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.742 0.155 326.409);
  --primary-foreground: oklch(0.211 0.067 326.971);
  --secondary: oklch(0.922 0.004 325.133);
  --secondary-foreground: oklch(0.414 0.016 325.363);
  --accent: oklch(0.922 0.004 325.133);
  --accent-foreground: oklch(0.414 0.016 325.363);
  --destructive: oklch(0.353 0.131 32.71);
  --destructive-foreground: oklch(0.831 0.094 30.291);
  --ring: oklch(0.742 0.155 326.409);
  --chart-1: oklch(0.742 0.155 326.409);
  --chart-2: oklch(0.922 0.004 325.133);
  --chart-3: oklch(0.922 0.004 325.133);
  --chart-4: oklch(0.946 0.003 325.123);
  --chart-5: oklch(0.742 0.162 326.464);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.02 326.066);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.21 0.029 325.987);
  --muted-foreground: oklch(0.796 0.005 325.141);
  --popover: oklch(0.141 0.02 326.066);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.153 0.024 326.104);
  --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.742 0.155 326.409);
  --primary-foreground: oklch(0.211 0.067 326.971);
  --secondary: oklch(0.233 0.021 325.688);
  --secondary-foreground: oklch(0.772 0.036 325.414);
  --accent: oklch(0.233 0.021 325.688);
  --accent-foreground: oklch(0.772 0.036 325.414);
  --destructive: oklch(0.653 0.234 32.093);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.742 0.155 326.409);
  --chart-1: oklch(0.742 0.155 326.409);
  --chart-2: oklch(0.233 0.021 325.688);
  --chart-3: oklch(0.233 0.021 325.688);
  --chart-4: oklch(0.264 0.025 325.726);
  --chart-5: oklch(0.742 0.162 326.464);
}