Sharp for shadcn/ui

Sharp is a shadcn/ui theme built around a deep violet primary color (#211127) with deep green accents (#172711). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the deep violet primary (#211127) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#fdfbfewhite
#060307black
Foreground
#070209black
#ffffffwhite
Card
#fbf6fdghostwhite
#09050ablack
Card foreground
#030104black
#ffffffwhite
Popover
#fdfbfewhite
#060307black
Popover foreground
#070209black
#ffffffwhite
Primary
#211127black
#211127black
Primary foreground
#c298d2plum
#c298d2plum
Secondary
#172711black
#172711black
Secondary foreground
#6db351mediumseagreen
#6db351mediumseagreen
Muted
#eaece9linen
#141613black
Muted foreground
#575f54dimgray
#a3aba0darkgray
Accent
#172711black
#172711black
Accent foreground
#6db351mediumseagreen
#6db351mediumseagreen
Destructive
#902c04saddlebrown
#f96124tomato
Destructive foreground
#fed7c8bisque
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#211127black
#211127black

Contrast

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

Light mode
Text on background19.94:1AAA
Text on card19.57:1AAA
Primary button7.42:1AAA
Secondary button6.15:1AA
Muted text5.57:1AA
Accent6.15:1AA
Destructive6.19:1AA
Dark mode
Text on background20.47:1AAA
Text on card20.22:1AAA
Primary button7.42:1AAA
Secondary button6.15:1AA
Muted text7.72:1AAA
Accent6.15:1AA
Destructive6.76:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 316.593);
  --foreground: oklch(0.102 0.029 319.012);
  --muted: oklch(0.941 0.004 136.621);
  --muted-foreground: oklch(0.474 0.019 136.735);
  --popover: oklch(0.99 0.005 316.593);
  --popover-foreground: oklch(0.102 0.029 319.012);
  --card: oklch(0.98 0.011 316.576);
  --card-foreground: oklch(0.081 0.023 319.012);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.211 0.047 315.852);
  --primary-foreground: oklch(0.738 0.093 316.23);
  --secondary: oklch(0.252 0.045 137.346);
  --secondary-foreground: oklch(0.698 0.15 137.647);
  --accent: oklch(0.252 0.045 137.346);
  --accent-foreground: oklch(0.698 0.15 137.647);
  --destructive: oklch(0.441 0.142 37.808);
  --destructive-foreground: oklch(0.909 0.048 42.748);
  --ring: oklch(0.211 0.047 315.852);
  --chart-1: oklch(0.211 0.047 315.852);
  --chart-2: oklch(0.252 0.045 137.346);
  --chart-3: oklch(0.252 0.045 137.346);
  --chart-4: oklch(0.29 0.054 137.419);
  --chart-5: oklch(0.21 0.05 315.771);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.11 0.013 317.665);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.196 0.006 136.695);
  --muted-foreground: oklch(0.732 0.017 136.681);
  --popover: oklch(0.11 0.013 317.665);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.126 0.015 317.665);
  --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.211 0.047 315.852);
  --primary-foreground: oklch(0.738 0.093 316.23);
  --secondary: oklch(0.252 0.045 137.346);
  --secondary-foreground: oklch(0.698 0.15 137.647);
  --accent: oklch(0.252 0.045 137.346);
  --accent-foreground: oklch(0.698 0.15 137.647);
  --destructive: oklch(0.682 0.199 39.393);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.211 0.047 315.852);
  --chart-1: oklch(0.211 0.047 315.852);
  --chart-2: oklch(0.252 0.045 137.346);
  --chart-3: oklch(0.252 0.045 137.346);
  --chart-4: oklch(0.29 0.054 137.419);
  --chart-5: oklch(0.21 0.05 315.771);
}