Carpeting for shadcn/ui

Carpeting is a shadcn/ui theme built around a vivid indigo primary color (#120fd2) with vivid yellow accents (#cfd20f). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#120fd2) on an indigo-tinted background (#06060e).

Color palette

TokenLightDark
Background
#ffffffwhite
#06060eblack
Foreground
#03020dblack
#fcfcfdwhite
Card
#ffffffwhite
#06060eblack
Card foreground
#03020dblack
#fcfcfdwhite
Popover
#ffffffwhite
#06060eblack
Popover foreground
#03020dblack
#fcfcfdwhite
Primary
#120fd2mediumblue
#120fd2mediumblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cfd20fgoldenrod
#cfd20fgoldenrod
Secondary foreground
#131301black
#131301black
Muted
#f3f3e7linen
#17180cblack
Muted foreground
#626255dimgray
#a9aa9ddarkgray
Accent
#cfd20fgoldenrod
#cfd20fgoldenrod
Accent foreground
#131301black
#131301black
Destructive
#a0180efirebrick
#ee463atomato
Destructive foreground
#fde5e3mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#120fd2mediumblue
#120fd2mediumblue

Contrast

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

Light mode
Text on background20.62:1AAA
Text on card20.62:1AAA
Primary button10.39:1AAA
Secondary button11.45:1AAA
Muted text5.52:1AA
Accent11.45:1AAA
Destructive6.68:1AA
Dark mode
Text on background19.67:1AAA
Text on card19.67:1AAA
Primary button10.39:1AAA
Secondary button11.45:1AAA
Muted text7.62:1AAA
Accent11.45:1AAA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.101 0.031 280.486);
  --muted: oklch(0.96 0.015 107.454);
  --muted-foreground: oklch(0.493 0.02 107.888);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.101 0.031 280.486);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.101 0.031 280.486);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.4 0.263 266.051);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.833 0.181 110.886);
  --secondary-foreground: oklch(0.181 0.036 110.269);
  --accent: oklch(0.833 0.181 110.886);
  --accent-foreground: oklch(0.181 0.036 110.269);
  --destructive: oklch(0.453 0.171 29.621);
  --destructive-foreground: oklch(0.939 0.027 22.549);
  --ring: oklch(0.4 0.263 266.051);
  --chart-1: oklch(0.4 0.263 266.051);
  --chart-2: oklch(0.833 0.181 110.886);
  --chart-3: oklch(0.833 0.181 110.886);
  --chart-4: oklch(0.875 0.19 110.892);
  --chart-5: oklch(0.402 0.268 265.569);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.128 0.019 284.27);
  --foreground: oklch(0.991 0.002 287.137);
  --muted: oklch(0.203 0.021 108.956);
  --muted-foreground: oklch(0.733 0.018 107.614);
  --popover: oklch(0.128 0.019 284.27);
  --popover-foreground: oklch(0.991 0.002 287.137);
  --card: oklch(0.128 0.019 284.27);
  --card-foreground: oklch(0.991 0.002 287.137);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.4 0.263 266.051);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.833 0.181 110.886);
  --secondary-foreground: oklch(0.181 0.036 110.269);
  --accent: oklch(0.833 0.181 110.886);
  --accent-foreground: oklch(0.181 0.036 110.269);
  --destructive: oklch(0.636 0.206 28.476);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.4 0.263 266.051);
  --chart-1: oklch(0.4 0.263 266.051);
  --chart-2: oklch(0.833 0.181 110.886);
  --chart-3: oklch(0.833 0.181 110.886);
  --chart-4: oklch(0.875 0.19 110.892);
  --chart-5: oklch(0.402 0.268 265.569);
}