Metallic for shadcn/ui

Metallic is a shadcn/ui theme built around an indigo primary color (#4a21de) with violet accents (#a821de). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#4a21de) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#ffffffwhite
#040307black
Foreground
#030109black
#fcfcfdwhite
Card
#fcfcfcsnow
#06040bblack
Card foreground
#010104black
#ffffffwhite
Popover
#fcfcfcsnow
#06040bblack
Popover foreground
#010104black
#ffffffwhite
Primary
#4a21deblueviolet
#4a21deblueviolet
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#2157deroyalblue
#2157deroyalblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e5e7eblavender
#14161ablack
Muted foreground
#3e3f41darkslategray
#bebfc1silver
Accent
#a821dedarkorchid
#a821dedarkorchid
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7c1604maroon
#e92907orangered
Destructive foreground
#fdc0b5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#4a21deblueviolet
#4a21deblueviolet

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.39:1AAA
Primary button8.19:1AAA
Secondary button6.05:1AA
Muted text8.50:1AAA
Accent5.32:1AA
Destructive6.80:1AA
Dark mode
Text on background20.07:1AAA
Text on card20.37:1AAA
Primary button8.19:1AAA
Secondary button6.05:1AA
Muted text9.85:1AAA
Accent5.32:1AA
Destructive4.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.091 0.029 295.145);
  --muted: oklch(0.927 0.006 268.749);
  --muted-foreground: oklch(0.368 0.003 268.728);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.072 0.023 295.145);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.072 0.023 295.145);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.458 0.254 279.349);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.51 0.214 263.86);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.563 0.261 313.098);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.38 0.139 32.248);
  --destructive-foreground: oklch(0.859 0.072 30.007);
  --ring: oklch(0.458 0.254 279.349);
  --chart-1: oklch(0.458 0.254 279.349);
  --chart-2: oklch(0.51 0.214 263.86);
  --chart-3: oklch(0.563 0.261 313.098);
  --chart-4: oklch(0.535 0.202 264.252);
  --chart-5: oklch(0.457 0.26 278.369);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.017 295.758);
  --foreground: oklch(0.991 0.002 296.289);
  --muted: oklch(0.199 0.008 268.45);
  --muted-foreground: oklch(0.804 0.003 268.768);
  --popover: oklch(0.117 0.019 295.702);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.117 0.019 295.702);
  --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.458 0.254 279.349);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.51 0.214 263.86);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.563 0.261 313.098);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.6 0.227 31.53);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.458 0.254 279.349);
  --chart-1: oklch(0.458 0.254 279.349);
  --chart-2: oklch(0.51 0.214 263.86);
  --chart-3: oklch(0.563 0.261 313.098);
  --chart-4: oklch(0.535 0.202 264.252);
  --chart-5: oklch(0.457 0.26 278.369);
}