Trial for shadcn/ui

Trial is a shadcn/ui theme built around a vivid purple primary color (#dc8df2) with vivid purple accents (#f28dd5). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the vivid purple primary (#dc8df2) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030104black
Foreground
#030104black
#ffffffwhite
Card
#fbf7fdghostwhite
#070208black
Card foreground
#000000black
#ffffffwhite
Popover
#fdfbfewhite
#030104black
Popover foreground
#030104black
#ffffffwhite
Primary
#dc8df2violet
#dc8df2violet
Primary foreground
#370844midnightblue
#370844midnightblue
Secondary
#a98df2mediumpurple
#a98df2mediumpurple
Secondary foreground
#190844midnightblue
#190844midnightblue
Muted
#f2f1f4whitesmoke
#0c0b0eblack
Muted foreground
#3c3649darkslategray
#bbb6c9silver
Accent
#f28dd5violet
#f28dd5violet
Accent foreground
#440833midnightblue
#440833midnightblue
Destructive
#8e1a0bdarkred
#df2911orangered
Destructive foreground
#fbd5d0bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dc8df2violet
#dc8df2violet

Contrast

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

Light mode
Text on background20.22:1AAA
Text on card19.85:1AAA
Primary button7.11:1AAA
Secondary button6.70:1AA
Muted text10.24:1AAA
Accent7.17:1AAA
Destructive6.72:1AA
Dark mode
Text on background20.77:1AAA
Text on card20.56:1AAA
Primary button7.11:1AAA
Secondary button6.70:1AA
Muted text9.94:1AAA
Accent7.17:1AAA
Destructive4.71:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 318.889);
  --foreground: oklch(0.085 0.017 320.608);
  --muted: oklch(0.959 0.004 299.23);
  --muted-foreground: oklch(0.347 0.034 297.613);
  --popover: oklch(0.991 0.004 318.889);
  --popover-foreground: oklch(0.085 0.017 320.608);
  --card: oklch(0.981 0.009 318.887);
  --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.759 0.161 318.724);
  --primary-foreground: oklch(0.257 0.11 317.549);
  --secondary: oklch(0.71 0.145 295.505);
  --secondary-foreground: oklch(0.213 0.103 286.817);
  --accent: oklch(0.772 0.15 338.448);
  --accent-foreground: oklch(0.269 0.102 342.405);
  --destructive: oklch(0.421 0.153 31.024);
  --destructive-foreground: oklch(0.903 0.044 26.842);
  --ring: oklch(0.759 0.161 318.724);
  --chart-1: oklch(0.759 0.161 318.724);
  --chart-2: oklch(0.71 0.145 295.505);
  --chart-3: oklch(0.772 0.15 338.448);
  --chart-4: oklch(0.744 0.127 296.199);
  --chart-5: oklch(0.758 0.167 318.709);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.02 320.937);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.153 0.007 298.562);
  --muted-foreground: oklch(0.786 0.027 298.704);
  --popover: oklch(0.083 0.02 320.937);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.105 0.026 320.937);
  --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.759 0.161 318.724);
  --primary-foreground: oklch(0.257 0.11 317.549);
  --secondary: oklch(0.71 0.145 295.505);
  --secondary-foreground: oklch(0.213 0.103 286.817);
  --accent: oklch(0.772 0.15 338.448);
  --accent-foreground: oklch(0.269 0.102 342.405);
  --destructive: oklch(0.583 0.218 30.942);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.759 0.161 318.724);
  --chart-1: oklch(0.759 0.161 318.724);
  --chart-2: oklch(0.71 0.145 295.505);
  --chart-3: oklch(0.772 0.15 338.448);
  --chart-4: oklch(0.744 0.127 296.199);
  --chart-5: oklch(0.758 0.167 318.709);
}