Sapphire (Dim) for shadcn/ui

Sapphire (Dim) is a shadcn/ui theme built around a near-white primary color (#ffffff) with deep blue accents (#1d2f49). The light mode uses a blue-tinted background (#070c12). Dark mode keeps the near-white primary (#ffffff) on a blue-tinted background (#070c12).

Color palette

TokenLightDark
Background
#070c12black
#070c12black
Foreground
#f0f0f0whitesmoke
#f0f0f0whitesmoke
Card
#04070bblack
#04070bblack
Card foreground
#fcfcfcsnow
#fcfcfcsnow
Popover
#030507black
#030507black
Popover foreground
#ffffffwhite
#ffffffwhite
Primary
#ffffffwhite
#ffffffwhite
Primary foreground
#333333darkslategray
#333333darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#22252bdarkslategray
#22252bdarkslategray
Muted foreground
#9ba4b0darkgray
#9ba4b0darkgray
Accent
#1d2f49darkslategray
#1d2f49darkslategray
Accent foreground
#b6c8e2lightsteelblue
#b6c8e2lightsteelblue
Destructive
#e72813orangered
#e72813orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#111822black
#111822black
Input
#161f2cblack
#161f2cblack
Ring
#ffffffwhite
#ffffffwhite

Contrast

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

Light mode
Text on background17.22:1AAA
Text on card19.65:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.07:1AA
Accent7.91:1AAA
Destructive4.45:1AA Large
Dark mode
Text on background17.22:1AAA
Text on card19.65:1AAA
Primary button12.63:1AAA
Secondary button7.37:1AAA
Muted text6.07:1AA
Accent7.91:1AAA
Destructive4.45:1AA Large

CSS variables

Paste this into your globals.css to use Sapphire (Dim) in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.152 0.016 255.632);
  --foreground: oklch(0.954 0 180);
  --muted: oklch(0.265 0.011 256.777);
  --muted-foreground: oklch(0.715 0.021 256.747);
  --popover: oklch(0.111 0.01 250.505);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.127 0.011 250.635);
  --card-foreground: oklch(0.992 0 161.565);
  --border: oklch(0.207 0.022 256.849);
  --input: oklch(0.238 0.028 256.858);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.304 0.052 256.944);
  --accent-foreground: oklch(0.828 0.041 256.788);
  --destructive: oklch(0.597 0.226 30.503);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.304 0.052 256.944);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.152 0.016 255.632);
  --foreground: oklch(0.954 0 180);
  --muted: oklch(0.265 0.011 256.777);
  --muted-foreground: oklch(0.715 0.021 256.747);
  --popover: oklch(0.111 0.01 250.505);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.127 0.011 250.635);
  --card-foreground: oklch(0.992 0 161.565);
  --border: oklch(0.207 0.022 256.849);
  --input: oklch(0.238 0.028 256.858);
  --primary: oklch(1 0 180);
  --primary-foreground: oklch(0.321 0 180);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.304 0.052 256.944);
  --accent-foreground: oklch(0.828 0.041 256.788);
  --destructive: oklch(0.597 0.226 30.503);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(1 0 180);
  --chart-1: oklch(1 0 180);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.304 0.052 256.944);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(1 0 180);
}