Dim for shadcn/ui

Dim is a shadcn/ui theme built around a deep blue primary color (#060814) with deep yellow accents (#141106). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#060814) on a neutral background (#030407).

Color palette

TokenLightDark
Background
#ffffffwhite
#030407black
Foreground
#010204black
#fcfcfdwhite
Card
#ffffffwhite
#030407black
Card foreground
#010204black
#fcfcfdwhite
Popover
#ffffffwhite
#030407black
Popover foreground
#010204black
#fcfcfdwhite
Primary
#060814black
#060814black
Primary foreground
#c3cceelightsteelblue
#c3cceelightsteelblue
Secondary
#141106black
#141106black
Secondary foreground
#b39932peru
#b39932peru
Muted
#edece8linen
#171612black
Muted foreground
#53514bdarkslategray
#b4b2acdarkgray
Accent
#141106black
#141106black
Accent foreground
#b39932peru
#b39932peru
Destructive
#912c0dsaddlebrown
#ed5d31tomato
Destructive foreground
#fbded5antiquewhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#060814black
#060814black

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.75:1AAA
Primary button12.51:1AAA
Secondary button6.75:1AA
Muted text6.71:1AA
Accent6.75:1AA
Destructive6.41:1AA
Dark mode
Text on background19.98:1AAA
Text on card19.98:1AAA
Primary button12.51:1AAA
Secondary button6.75:1AA
Muted text8.54:1AAA
Accent6.75:1AA
Destructive6.19:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.08 0.014 267.519);
  --muted: oklch(0.943 0.005 95.1);
  --muted-foreground: oklch(0.436 0.01 95.299);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.08 0.014 267.519);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.08 0.014 267.519);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.14 0.026 269.875);
  --primary-foreground: oklch(0.849 0.049 274.257);
  --secondary: oklch(0.177 0.023 96.512);
  --secondary-foreground: oklch(0.688 0.122 94.693);
  --accent: oklch(0.177 0.023 96.512);
  --accent-foreground: oklch(0.688 0.122 94.693);
  --destructive: oklch(0.444 0.142 36.006);
  --destructive-foreground: oklch(0.922 0.035 37.614);
  --ring: oklch(0.14 0.026 269.875);
  --chart-1: oklch(0.14 0.026 269.875);
  --chart-2: oklch(0.177 0.023 96.512);
  --chart-3: oklch(0.177 0.023 96.512);
  --chart-4: oklch(0.223 0.032 95.625);
  --chart-5: oklch(0.139 0.027 269.375);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.01 271.306);
  --foreground: oklch(0.991 0.002 275.011);
  --muted: oklch(0.199 0.008 95.446);
  --muted-foreground: oklch(0.764 0.009 95.171);
  --popover: oklch(0.108 0.01 271.306);
  --popover-foreground: oklch(0.991 0.002 275.011);
  --card: oklch(0.108 0.01 271.306);
  --card-foreground: oklch(0.991 0.002 275.011);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.14 0.026 269.875);
  --primary-foreground: oklch(0.849 0.049 274.257);
  --secondary: oklch(0.177 0.023 96.512);
  --secondary-foreground: oklch(0.688 0.122 94.693);
  --accent: oklch(0.177 0.023 96.512);
  --accent-foreground: oklch(0.688 0.122 94.693);
  --destructive: oklch(0.658 0.188 36.988);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.14 0.026 269.875);
  --chart-1: oklch(0.14 0.026 269.875);
  --chart-2: oklch(0.177 0.023 96.512);
  --chart-3: oklch(0.177 0.023 96.512);
  --chart-4: oklch(0.223 0.032 95.625);
  --chart-5: oklch(0.139 0.027 269.375);
}