Sharp for shadcn/ui

Sharp is a shadcn/ui theme built around a near-black primary color (#010304) with near-black accents (#040201). The light mode uses a neutral background (#ffffff). Dark mode keeps the near-black primary (#010304) on a neutral background (#010304).

Color palette

TokenLightDark
Background
#ffffffwhite
#010304black
Foreground
#040e15black
#fcfdfdwhite
Card
#fcfcfcsnow
#020608black
Card foreground
#030b11black
#ffffffwhite
Popover
#ffffffwhite
#010304black
Popover foreground
#040e15black
#fcfdfdwhite
Primary
#010304black
#010304black
Primary foreground
#69a2cecornflowerblue
#69a2cecornflowerblue
Secondary
#040201black
#040201black
Secondary foreground
#ce9569darksalmon
#ce9569darksalmon
Muted
#ece2d9antiquewhite
#261b13black
Muted foreground
#504c49darkslategray
#b6b2afdarkgray
Accent
#040201black
#040201black
Accent foreground
#ce9569darksalmon
#ce9569darksalmon
Destructive
#dc0f04red
#e61005red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#010304black
#010304black

Contrast

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

Light mode
Text on background19.46:1AAA
Text on card19.38:1AAA
Primary button7.54:1AAA
Secondary button8.00:1AAA
Muted text6.65:1AA
Accent8.00:1AAA
Destructive5.10:1AA
Dark mode
Text on background20.30:1AAA
Text on card20.38:1AAA
Primary button7.54:1AAA
Secondary button8.00:1AAA
Muted text8.01:1AAA
Accent8.00:1AAA
Destructive4.73: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.157 0.022 239.528);
  --muted: oklch(0.918 0.016 60.04);
  --muted-foreground: oklch(0.42 0.008 60.024);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.157 0.022 239.528);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.144 0.019 236.712);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.091 0.009 233.536);
  --primary-foreground: oklch(0.691 0.089 242.549);
  --secondary: oklch(0.093 0.009 67.828);
  --secondary-foreground: oklch(0.715 0.091 58.058);
  --accent: oklch(0.093 0.009 67.828);
  --accent-foreground: oklch(0.715 0.091 58.058);
  --destructive: oklch(0.565 0.227 29.574);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.091 0.009 233.536);
  --chart-1: oklch(0.091 0.009 233.536);
  --chart-2: oklch(0.093 0.009 67.828);
  --chart-3: oklch(0.093 0.009 67.828);
  --chart-4: oklch(0.149 0.015 64.35);
  --chart-5: oklch(0.091 0.009 233.158);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.09 0.01 232.531);
  --foreground: oklch(0.992 0.001 240.299);
  --muted: oklch(0.232 0.023 58.731);
  --muted-foreground: oklch(0.766 0.007 60.161);
  --popover: oklch(0.09 0.01 232.531);
  --popover-foreground: oklch(0.992 0.001 240.299);
  --card: oklch(0.114 0.013 232.531);
  --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.091 0.009 233.536);
  --primary-foreground: oklch(0.691 0.089 242.549);
  --secondary: oklch(0.093 0.009 67.828);
  --secondary-foreground: oklch(0.715 0.091 58.058);
  --accent: oklch(0.093 0.009 67.828);
  --accent-foreground: oklch(0.715 0.091 58.058);
  --destructive: oklch(0.584 0.235 29.563);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.091 0.009 233.536);
  --chart-1: oklch(0.091 0.009 233.536);
  --chart-2: oklch(0.093 0.009 67.828);
  --chart-3: oklch(0.093 0.009 67.828);
  --chart-4: oklch(0.149 0.015 64.35);
  --chart-5: oklch(0.091 0.009 233.158);
}