Recent for shadcn/ui

Recent is a shadcn/ui theme built around a violet primary color (#7a5ac4) with green accents (#a4c45a). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the violet primary (#7a5ac4) on a violet-tinted background (#08050f).

Color palette

TokenLightDark
Background
#fcfbfewhite
#08050fblack
Foreground
#0a0514black
#faf9fbghostwhite
Card
#f9f7fdghostwhite
#0a0713black
Card foreground
#080410black
#fcfcfdwhite
Popover
#f9f7fdghostwhite
#0a0713black
Popover foreground
#080410black
#fcfcfdwhite
Primary
#7a5ac4slateblue
#7a5ac4slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#a4c45adarkkhaki
#a4c45adarkkhaki
Secondary foreground
#000000black
#000000black
Muted
#eeeeecwhitesmoke
#121311black
Muted foreground
#575757dimgray
#a8a8a8darkgray
Accent
#a4c45adarkkhaki
#a4c45adarkkhaki
Accent foreground
#000000black
#000000black
Destructive
#b10802darkred
#fd2d26orangered
Destructive foreground
#ffe7e6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7a5ac4slateblue
#7a5ac4slateblue

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.09:1AAA
Primary button5.14:1AA
Secondary button10.57:1AAA
Muted text6.21:1AA
Accent10.57:1AAA
Destructive6.15:1AA
Dark mode
Text on background19.22:1AAA
Text on card19.48:1AAA
Primary button5.14:1AA
Secondary button10.57:1AAA
Muted text7.84:1AAA
Accent10.57:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 299.976);
  --foreground: oklch(0.136 0.033 297.304);
  --muted: oklch(0.948 0.002 120.081);
  --muted-foreground: oklch(0.456 0 180);
  --popover: oklch(0.979 0.007 299.912);
  --popover-foreground: oklch(0.125 0.029 298.86);
  --card: oklch(0.979 0.007 299.912);
  --card-foreground: oklch(0.125 0.029 298.86);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.551 0.158 294.46);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.773 0.138 123.494);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.773 0.138 123.494);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.479 0.193 29.539);
  --destructive-foreground: oklch(0.946 0.027 20.012);
  --ring: oklch(0.551 0.158 294.46);
  --chart-1: oklch(0.551 0.158 294.46);
  --chart-2: oklch(0.773 0.138 123.494);
  --chart-3: oklch(0.773 0.138 123.494);
  --chart-4: oklch(0.788 0.13 123.148);
  --chart-5: oklch(0.547 0.168 293.971);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.024 299.067);
  --foreground: oklch(0.983 0.002 299.996);
  --muted: oklch(0.184 0.004 120.373);
  --muted-foreground: oklch(0.733 0 180);
  --popover: oklch(0.139 0.028 297.575);
  --popover-foreground: oklch(0.992 0.001 300.017);
  --card: oklch(0.139 0.028 297.575);
  --card-foreground: oklch(0.992 0.001 300.017);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.551 0.158 294.46);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.773 0.138 123.494);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.773 0.138 123.494);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.64 0.24 28.528);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.551 0.158 294.46);
  --chart-1: oklch(0.551 0.158 294.46);
  --chart-2: oklch(0.773 0.138 123.494);
  --chart-3: oklch(0.773 0.138 123.494);
  --chart-4: oklch(0.788 0.13 123.148);
  --chart-5: oklch(0.547 0.168 293.971);
}