Subexpression for shadcn/ui

Subexpression is a shadcn/ui theme built around a cyan primary color (#3e7074) with muted light cyan accents (#cad3d3). The light mode uses a neutral background (#ffffff). Dark mode keeps the cyan primary (#3e7074) on a cyan-tinted background (#040f10).

Color palette

TokenLightDark
Background
#ffffffwhite
#040f10black
Foreground
#010404black
#ffffffwhite
Card
#ffffffwhite
#040f10black
Card foreground
#010404black
#ffffffwhite
Popover
#ffffffwhite
#040f10black
Popover foreground
#010404black
#ffffffwhite
Primary
#3e7074seagreen
#3e7074seagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e4e6e7gainsboro
#293c3ddarkslategray
Secondary foreground
#494f50darkslategray
#c2d5d6lightgrey
Muted
#eff5f6whitesmoke
#091010black
Muted foreground
#595e5fdimgray
#a0a5a6darkgray
Accent
#cad3d3lightgrey
#355c5fdarkslategray
Accent foreground
#303a3bdarkslategray
#ffffffwhite
Destructive
#ac2811firebrick
#ec563ctomato
Destructive foreground
#fef3f1seashell
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3e7074seagreen
#3e7074seagreen

Contrast

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

Light mode
Text on background20.57:1AAA
Text on card20.57:1AAA
Primary button5.58:1AA
Secondary button6.68:1AA
Muted text5.97:1AA
Accent7.64:1AAA
Destructive6.30:1AA
Dark mode
Text on background19.39:1AAA
Text on card19.39:1AAA
Primary button5.58:1AA
Secondary button7.66:1AAA
Muted text7.72:1AAA
Accent7.39:1AAA
Destructive5.96:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.012 200.815);
  --muted: oklch(0.966 0.007 203.517);
  --muted-foreground: oklch(0.478 0.006 203.461);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.012 200.815);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.099 0.012 200.815);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.511 0.054 203.17);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.925 0.002 203.561);
  --secondary-foreground: oklch(0.423 0.007 203.429);
  --accent: oklch(0.859 0.01 203.479);
  --accent-foreground: oklch(0.34 0.013 203.274);
  --destructive: oklch(0.489 0.171 32.214);
  --destructive-foreground: oklch(0.972 0.012 29.512);
  --ring: oklch(0.511 0.054 203.17);
  --chart-1: oklch(0.511 0.054 203.17);
  --chart-2: oklch(0.925 0.002 203.561);
  --chart-3: oklch(0.859 0.01 203.479);
  --chart-4: oklch(0.947 0.001 203.567);
  --chart-5: oklch(0.516 0.058 203.213);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.018 202.306);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.165 0.01 203.154);
  --muted-foreground: oklch(0.72 0.006 203.507);
  --popover: oklch(0.158 0.018 202.306);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.158 0.018 202.306);
  --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.511 0.054 203.17);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.339 0.024 203.135);
  --secondary-foreground: oklch(0.858 0.02 203.379);
  --accent: oklch(0.447 0.045 203.15);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.65 0.189 32.272);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.511 0.054 203.17);
  --chart-1: oklch(0.511 0.054 203.17);
  --chart-2: oklch(0.339 0.024 203.135);
  --chart-3: oklch(0.447 0.045 203.15);
  --chart-4: oklch(0.371 0.027 203.132);
  --chart-5: oklch(0.516 0.058 203.213);
}