Coder Coder Dark Theme for shadcn/ui

Coder Coder Dark Theme is a shadcn/ui theme built around a muted light blue primary color (#dddfe9) with deep indigo accents (#2b274e). The light mode uses an indigo-tinted background (#0f0e1b). Dark mode keeps the muted light blue primary (#dddfe9) on an indigo-tinted background (#0f0e1b).

Color palette

TokenLightDark
Background
#0f0e1bblack
#0f0e1bblack
Foreground
#dddfe9gainsboro
#dddfe9gainsboro
Card
#0b0a14black
#0b0a14black
Card foreground
#eceef3whitesmoke
#eceef3whitesmoke
Popover
#090911black
#090911black
Popover foreground
#fcfcfdwhite
#fcfcfdwhite
Primary
#dddfe9gainsboro
#dddfe9gainsboro
Primary foreground
#3a4059darkslategray
#3a4059darkslategray
Secondary
#393b47darkslategray
#393b47darkslategray
Secondary foreground
#d5d6ddgainsboro
#d5d6ddgainsboro
Muted
#22222bdarkslategray
#22222bdarkslategray
Muted foreground
#9d9bb0darkgray
#9d9bb0darkgray
Accent
#2b274edarkslategray
#2b274edarkslategray
Accent foreground
#c8c5e2thistle
#c8c5e2thistle
Destructive
#ef413etomato
#ef413etomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#1b1a29black
#1b1a29black
Input
#211f32darkslategray
#211f32darkslategray
Ring
#dddfe9gainsboro
#dddfe9gainsboro

Contrast

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

Light mode
Text on background14.40:1AAA
Text on card16.91:1AAA
Primary button7.68:1AAA
Secondary button7.66:1AAA
Muted text5.83:1AA
Accent8.33:1AAA
Destructive3.82:1AA Large
Dark mode
Text on background14.40:1AAA
Text on card16.91:1AAA
Primary button7.68:1AAA
Secondary button7.66:1AAA
Muted text5.83:1AA
Accent8.33:1AAA
Destructive3.82:1AA Large

CSS variables

Paste this into your globals.css to use Coder Coder Dark Theme in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.171 0.028 286.895);
  --foreground: oklch(0.905 0.013 277.051);
  --muted: oklch(0.255 0.017 288.941);
  --muted-foreground: oklch(0.698 0.031 289.393);
  --popover: oklch(0.143 0.018 287.907);
  --popover-foreground: oklch(0.991 0.001 277.243);
  --card: oklch(0.153 0.021 287.382);
  --card-foreground: oklch(0.948 0.007 277.154);
  --border: oklch(0.225 0.029 287.598);
  --input: oklch(0.252 0.035 287.406);
  --primary: oklch(0.905 0.013 277.051);
  --primary-foreground: oklch(0.377 0.045 275.309);
  --secondary: oklch(0.355 0.02 276.392);
  --secondary-foreground: oklch(0.877 0.01 277.106);
  --accent: oklch(0.298 0.069 285.233);
  --accent-foreground: oklch(0.835 0.04 289.333);
  --destructive: oklch(0.633 0.212 26.419);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.905 0.013 277.051);
  --chart-1: oklch(0.905 0.013 277.051);
  --chart-2: oklch(0.355 0.02 276.392);
  --chart-3: oklch(0.298 0.069 285.233);
  --chart-4: oklch(0.382 0.023 276.372);
  --chart-5: oklch(0.904 0.015 277.02);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.171 0.028 286.895);
  --foreground: oklch(0.905 0.013 277.051);
  --muted: oklch(0.255 0.017 288.941);
  --muted-foreground: oklch(0.698 0.031 289.393);
  --popover: oklch(0.143 0.018 287.907);
  --popover-foreground: oklch(0.991 0.001 277.243);
  --card: oklch(0.153 0.021 287.382);
  --card-foreground: oklch(0.948 0.007 277.154);
  --border: oklch(0.225 0.029 287.598);
  --input: oklch(0.252 0.035 287.406);
  --primary: oklch(0.905 0.013 277.051);
  --primary-foreground: oklch(0.377 0.045 275.309);
  --secondary: oklch(0.355 0.02 276.392);
  --secondary-foreground: oklch(0.877 0.01 277.106);
  --accent: oklch(0.298 0.069 285.233);
  --accent-foreground: oklch(0.835 0.04 289.333);
  --destructive: oklch(0.633 0.212 26.419);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.905 0.013 277.051);
  --chart-1: oklch(0.905 0.013 277.051);
  --chart-2: oklch(0.355 0.02 276.392);
  --chart-3: oklch(0.298 0.069 285.233);
  --chart-4: oklch(0.382 0.023 276.372);
  --chart-5: oklch(0.904 0.015 277.02);
}