tce v3 for shadcn/ui

tce v3 is a shadcn/ui theme built around a blue primary color (#1f4889) with light blue accents (#ebf3f7). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#1f4889) on a blue-tinted background (#05070c).

Color palette

TokenLightDark
Background
#ffffffwhite
#05070cblack
Foreground
#030911black
#ffffffwhite
Card
#fcfcfcsnow
#000204black
Card foreground
#03060dblack
#ffffffwhite
Popover
#ffffffwhite
#07090dblack
Popover foreground
#030911black
#ffffffwhite
Primary
#1f4889darkslateblue
#1f4889darkslateblue
Primary foreground
#e2ebf8lavender
#e2ebf8lavender
Secondary
#fbcd02gold
#f6ac14orange
Secondary foreground
#000000black
#000000black
Muted
#ebf3f7whitesmoke
#1c2333darkslategray
Muted foreground
#1d1a15black
#dfe8fflavender
Accent
#ebf3f7whitesmoke
#151e35midnightblue
Accent foreground
#100f0fblack
#ffffffwhite
Destructive
#f54343tomato
#fb5228tomato
Destructive foreground
#ffeaealinen
#000000black
Border
#eeeff2whitesmoke
#1d2026black
Input
#eeeff2whitesmoke
#1d2026black
Ring
#1f4889darkslateblue
#1f4889darkslateblue

Contrast

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

Light mode
Text on background19.98:1AAA
Text on card19.83:1AAA
Primary button7.46:1AAA
Secondary button13.83:1AAA
Muted text15.44:1AAA
Accent17.03:1AAA
Destructive3.15:1AA Large
Dark mode
Text on background20.13:1AAA
Text on card20.82:1AAA
Primary button7.46:1AAA
Secondary button10.82:1AAA
Muted text12.80:1AAA
Accent16.48:1AAA
Destructive6.33:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.136 0.022 253.202);
  --muted: oklch(0.959 0.01 228.889);
  --muted-foreground: oklch(0.22 0.011 79.725);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.136 0.022 253.202);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.123 0.018 250.764);
  --border: oklch(0.952 0.004 259.938);
  --input: oklch(0.952 0.004 259.938);
  --primary: oklch(0.41 0.118 259.566);
  --primary-foreground: oklch(0.936 0.021 259.945);
  --secondary: oklch(0.863 0.176 92.346);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.959 0.01 231.783);
  --accent-foreground: oklch(0.17 0.001 17.247);
  --destructive: oklch(0.646 0.215 25.596);
  --destructive-foreground: oklch(0.953 0.023 17.567);
  --ring: oklch(0.41 0.118 259.566);
  --chart-1: oklch(0.41 0.118 259.566);
  --chart-2: oklch(0.863 0.176 92.346);
  --chart-3: oklch(0.541 0.142 150.532);
  --chart-4: oklch(0.604 0.229 27.624);
  --chart-5: oklch(0.68 0.153 251.813);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.012 254.14);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.257 0.032 267.349);
  --muted-foreground: oklch(0.931 0.033 268.323);
  --popover: oklch(0.141 0.009 257.462);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.074 0.018 243.604);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.243 0.012 259.917);
  --input: oklch(0.243 0.012 259.917);
  --primary: oklch(0.41 0.118 259.566);
  --primary-foreground: oklch(0.936 0.021 259.945);
  --secondary: oklch(0.795 0.163 76.978);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.24 0.045 266.513);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.667 0.212 34.703);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.41 0.118 259.566);
  --chart-1: oklch(0.41 0.118 259.566);
  --chart-2: oklch(0.863 0.176 92.346);
  --chart-3: oklch(0.541 0.142 150.532);
  --chart-4: oklch(0.604 0.229 27.624);
  --chart-5: oklch(0.681 0.153 251.528);
}