Sharp for shadcn/ui

Sharp is a shadcn/ui theme built around a vivid light violet primary color (#e5a5fd) with muted light violet accents (#d1c1d7). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light violet primary (#e5a5fd) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#fdfcfdwhite
Card
#ffffffwhite
#000000black
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#e5a5fdplum
#e5a5fdplum
Primary foreground
#51036dindigo
#51036dindigo
Secondary
#e2dce4gainsboro
#252127darkslategray
Secondary foreground
#4c3e51darkslategray
#bfb7c2silver
Muted
#f4eff5whitesmoke
#0e0a10black
Muted foreground
#5f5d5fdimgray
#a1a0a2darkgray
Accent
#d1c1d7thistle
#372b3bdarkslategray
Accent foreground
#38283edarkslategray
#d0c4d4thistle
Destructive
#cf1107firebrick
#e71408red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e5a5fdplum
#e5a5fdplum

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.05:1AAA
Secondary button7.39:1AAA
Muted text5.75:1AA
Accent7.98:1AAA
Destructive5.62:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button7.05:1AAA
Secondary button8.13:1AAA
Muted text7.55:1AAA
Accent7.98:1AAA
Destructive4.65:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.958 0.01 317.166);
  --muted-foreground: oklch(0.482 0.003 317.173);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.814 0.137 316.77);
  --primary-foreground: oklch(0.33 0.161 313.32);
  --secondary: oklch(0.903 0.012 317.158);
  --secondary-foreground: oklch(0.386 0.036 316.977);
  --accent: oklch(0.831 0.036 317.092);
  --accent-foreground: oklch(0.305 0.045 316.829);
  --destructive: oklch(0.541 0.215 29.512);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.814 0.137 316.77);
  --chart-1: oklch(0.814 0.137 316.77);
  --chart-2: oklch(0.903 0.012 317.158);
  --chart-3: oklch(0.831 0.036 317.092);
  --chart-4: oklch(0.927 0.009 317.167);
  --chart-5: oklch(0.813 0.141 316.753);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.002 317.185);
  --muted: oklch(0.152 0.015 316.96);
  --muted-foreground: oklch(0.707 0.003 317.179);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.002 317.185);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.002 317.185);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.814 0.137 316.77);
  --primary-foreground: oklch(0.33 0.161 313.32);
  --secondary: oklch(0.254 0.012 317.08);
  --secondary-foreground: oklch(0.79 0.017 317.14);
  --accent: oklch(0.309 0.033 316.94);
  --accent-foreground: oklch(0.834 0.026 317.119);
  --destructive: oklch(0.588 0.235 29.509);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.814 0.137 316.77);
  --chart-1: oklch(0.814 0.137 316.77);
  --chart-2: oklch(0.254 0.012 317.08);
  --chart-3: oklch(0.309 0.033 316.94);
  --chart-4: oklch(0.285 0.014 317.074);
  --chart-5: oklch(0.813 0.141 316.753);
}