Centimeter for shadcn/ui

Centimeter is a shadcn/ui theme built around a vivid yellow primary color (#edf25a) with neutral gray accents (#cfd0ce). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid yellow primary (#edf25a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040401black
#f8f8f6whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#040401black
#f8f8f6whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#040401black
#f8f8f6whitesmoke
Primary
#edf25akhaki
#edf25akhaki
Primary foreground
#171802black
#171802black
Secondary
#cfd0celightgrey
#2f2f27darkslategray
Secondary foreground
#373734darkslategray
#c9cabfsilver
Muted
#f0f0ealinen
#14150fblack
Muted foreground
#5c5d51dimgray
#aeaea2darkgray
Accent
#cfd0celightgrey
#2f2f27darkslategray
Accent foreground
#373734darkslategray
#c9cabfsilver
Destructive
#682b08saddlebrown
#ec6618chocolate
Destructive foreground
#f8c7aanavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#edf25akhaki
#edf25akhaki

Contrast

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

Light mode
Text on background20.52:1AAA
Text on card20.52:1AAA
Primary button14.88:1AAA
Secondary button7.69:1AAA
Muted text5.83:1AA
Accent7.69:1AAA
Destructive7.07:1AAA
Dark mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button14.88:1AAA
Secondary button8.12:1AAA
Muted text8.21:1AAA
Accent8.12:1AAA
Destructive6.47:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.104 0.015 109.945);
  --muted: oklch(0.953 0.007 108.077);
  --muted-foreground: oklch(0.473 0.019 108.662);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.104 0.015 109.945);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.104 0.015 109.945);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.929 0.17 111.116);
  --primary-foreground: oklch(0.2 0.04 111.139);
  --secondary: oklch(0.856 0.003 107.996);
  --secondary-foreground: oklch(0.334 0.004 108.142);
  --accent: oklch(0.856 0.003 107.996);
  --accent-foreground: oklch(0.334 0.004 108.142);
  --destructive: oklch(0.37 0.097 45.648);
  --destructive-foreground: oklch(0.865 0.068 51.573);
  --ring: oklch(0.929 0.17 111.116);
  --chart-1: oklch(0.929 0.17 111.116);
  --chart-2: oklch(0.856 0.003 107.996);
  --chart-3: oklch(0.856 0.003 107.996);
  --chart-4: oklch(0.879 0.002 107.986);
  --chart-5: oklch(0.936 0.174 111.173);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.98 0.003 107.989);
  --muted: oklch(0.191 0.01 108.914);
  --muted-foreground: oklch(0.748 0.017 108.354);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.98 0.003 107.989);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.98 0.003 107.989);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.929 0.17 111.116);
  --primary-foreground: oklch(0.2 0.04 111.139);
  --secondary: oklch(0.303 0.014 108.746);
  --secondary-foreground: oklch(0.835 0.014 108.255);
  --accent: oklch(0.303 0.014 108.746);
  --accent-foreground: oklch(0.835 0.014 108.255);
  --destructive: oklch(0.668 0.184 44.46);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.929 0.17 111.116);
  --chart-1: oklch(0.929 0.17 111.116);
  --chart-2: oklch(0.303 0.014 108.746);
  --chart-3: oklch(0.303 0.014 108.746);
  --chart-4: oklch(0.336 0.016 108.774);
  --chart-5: oklch(0.936 0.174 111.173);
}