Yearly for shadcn/ui

Yearly is a shadcn/ui theme built around a violet primary color (#7d50b4) with purple accents (#af50b4). The light mode uses a neutral background (#faf7fc). Dark mode keeps the violet primary (#7d50b4) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#faf7fcghostwhite
#020104black
Foreground
#0a050fblack
#fcfcfdwhite
Card
#f7f4fbghostwhite
#050208black
Card foreground
#07040bblack
#ffffffwhite
Popover
#faf7fcghostwhite
#020104black
Popover foreground
#0a050fblack
#fcfcfdwhite
Primary
#7d50b4slateblue
#7d50b4slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5055b4slateblue
#5055b4slateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f0f0f5whitesmoke
#0a0b0fblack
Muted foreground
#484961darkslategray
#9e9fb7darkgray
Accent
#af50b4mediumorchid
#af50b4mediumorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c53c02firebrick
#fd7135tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7d50b4slateblue
#7d50b4slateblue

Contrast

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

Light mode
Text on background19.02:1AAA
Text on card18.64:1AAA
Primary button5.70:1AA
Secondary button6.35:1AA
Muted text7.69:1AAA
Accent4.53:1AA
Destructive5.21:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.58:1AAA
Primary button5.70:1AA
Secondary button6.35:1AA
Muted text7.59:1AAA
Accent4.53:1AA
Destructive7.58:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 306.335);
  --foreground: oklch(0.13 0.026 306.078);
  --muted: oklch(0.956 0.006 283.86);
  --muted-foreground: oklch(0.413 0.04 282.144);
  --popover: oklch(0.98 0.007 306.335);
  --popover-foreground: oklch(0.13 0.026 306.078);
  --card: oklch(0.971 0.011 306.287);
  --card-foreground: oklch(0.118 0.022 307.452);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.528 0.154 302.164);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.497 0.148 277.298);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.588 0.175 325.569);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.553 0.181 37.668);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.528 0.154 302.164);
  --chart-1: oklch(0.528 0.154 302.164);
  --chart-2: oklch(0.497 0.148 277.298);
  --chart-3: oklch(0.588 0.175 325.569);
  --chart-4: oklch(0.528 0.138 278.296);
  --chart-5: oklch(0.525 0.165 301.735);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.081 0.016 307.693);
  --foreground: oklch(0.991 0.002 306.405);
  --muted: oklch(0.15 0.01 282.759);
  --muted-foreground: oklch(0.711 0.035 283.087);
  --popover: oklch(0.081 0.016 307.693);
  --popover-foreground: oklch(0.991 0.002 306.405);
  --card: oklch(0.102 0.021 307.693);
  --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.528 0.154 302.164);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.497 0.148 277.298);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.588 0.175 325.569);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.71 0.186 41.63);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.528 0.154 302.164);
  --chart-1: oklch(0.528 0.154 302.164);
  --chart-2: oklch(0.497 0.148 277.298);
  --chart-3: oklch(0.588 0.175 325.569);
  --chart-4: oklch(0.528 0.138 278.296);
  --chart-5: oklch(0.525 0.165 301.735);
}