Porthole for shadcn/ui

Porthole is a shadcn/ui theme built around a muted deep cyan primary color (#323b3e) with muted deep blue accents (#32363e). The light mode uses a neutral background (#fcfdfd). Dark mode keeps the muted deep cyan primary (#323b3e) on a cyan-tinted background (#050d0f).

Color palette

TokenLightDark
Background
#fcfdfdwhite
#050d0fblack
Foreground
#020b0dblack
#f6f8f9whitesmoke
Card
#fcfdfdwhite
#050d0fblack
Card foreground
#020b0dblack
#f6f8f9whitesmoke
Popover
#fcfdfdwhite
#050d0fblack
Popover foreground
#020b0dblack
#f6f8f9whitesmoke
Primary
#323b3edarkslategray
#323b3edarkslategray
Primary foreground
#cdd4d6lightgrey
#cdd4d6lightgrey
Secondary
#323e3adarkslategray
#323e3adarkslategray
Secondary foreground
#cdd6d3lightgrey
#cdd6d3lightgrey
Muted
#eef6f4whitesmoke
#09110eblack
Muted foreground
#505e59dimgray
#a1afabdarkgray
Accent
#32363edarkslategray
#32363edarkslategray
Accent foreground
#cdcfd6lightgrey
#cdcfd6lightgrey
Destructive
#b20101darkred
#fe1b1bred
Destructive foreground
#ffe6e6mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#323b3edarkslategray
#323b3edarkslategray

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.49:1AAA
Primary button7.59:1AAA
Secondary button7.51:1AAA
Muted text6.21:1AA
Accent7.78:1AAA
Destructive6.13:1AA
Dark mode
Text on background18.37:1AAA
Text on card18.37:1AAA
Primary button7.59:1AAA
Secondary button7.51:1AAA
Muted text8.41:1AAA
Accent7.78:1AAA
Destructive3.90:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 214.321);
  --foreground: oklch(0.139 0.018 210.88);
  --muted: oklch(0.967 0.009 176.379);
  --muted-foreground: oklch(0.467 0.018 175.462);
  --popover: oklch(0.993 0.002 214.321);
  --popover-foreground: oklch(0.139 0.018 210.88);
  --card: oklch(0.993 0.002 214.321);
  --card-foreground: oklch(0.139 0.018 210.88);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.347 0.013 214.483);
  --primary-foreground: oklch(0.864 0.008 214.344);
  --secondary: oklch(0.351 0.016 175.271);
  --secondary-foreground: oklch(0.867 0.011 176.298);
  --accent: oklch(0.332 0.015 267.109);
  --accent-foreground: oklch(0.855 0.009 267.354);
  --destructive: oklch(0.479 0.196 29.184);
  --destructive-foreground: oklch(0.944 0.028 17.653);
  --ring: oklch(0.347 0.013 214.483);
  --chart-1: oklch(0.347 0.013 214.483);
  --chart-2: oklch(0.351 0.016 175.271);
  --chart-3: oklch(0.332 0.015 267.109);
  --chart-4: oklch(0.382 0.018 175.237);
  --chart-5: oklch(0.349 0.016 214.566);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.152 0.015 213.364);
  --foreground: oklch(0.978 0.003 214.324);
  --muted: oklch(0.167 0.014 174.15);
  --muted-foreground: oklch(0.743 0.017 175.994);
  --popover: oklch(0.152 0.015 213.364);
  --popover-foreground: oklch(0.978 0.003 214.324);
  --card: oklch(0.152 0.015 213.364);
  --card-foreground: oklch(0.978 0.003 214.324);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.347 0.013 214.483);
  --primary-foreground: oklch(0.864 0.008 214.344);
  --secondary: oklch(0.351 0.016 175.271);
  --secondary-foreground: oklch(0.867 0.011 176.298);
  --accent: oklch(0.332 0.015 267.109);
  --accent-foreground: oklch(0.855 0.009 267.354);
  --destructive: oklch(0.633 0.25 28.397);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.347 0.013 214.483);
  --chart-1: oklch(0.347 0.013 214.483);
  --chart-2: oklch(0.351 0.016 175.271);
  --chart-3: oklch(0.332 0.015 267.109);
  --chart-4: oklch(0.382 0.018 175.237);
  --chart-5: oklch(0.349 0.016 214.566);
}