Attribute for shadcn/ui

Attribute is a shadcn/ui theme built around a near-black primary color (#040301) with near-black accents (#040401). The light mode uses a neutral background (#fdfbf7). Dark mode keeps the near-black primary (#040301) on an orange-tinted background (#0e0b07).

Color palette

TokenLightDark
Background
#fdfbf7snow
#0e0b07black
Foreground
#110c04black
#fafaf9snow
Card
#fcf9f2floralwhite
#110e08black
Card foreground
#0c0903black
#fdfdfcwhite
Popover
#fcf9f2floralwhite
#110e08black
Popover foreground
#0c0903black
#fdfdfcwhite
Primary
#040301black
#040301black
Primary foreground
#d4a963darkkhaki
#d4a963darkkhaki
Secondary
#040101black
#040101black
Secondary foreground
#d47063indianred
#d47063indianred
Muted
#eeececlinen
#131111black
Muted foreground
#523f3ddarkslategray
#c2afadsilver
Accent
#040401black
#040401black
Accent foreground
#96a42dyellowgreen
#96a42dyellowgreen
Destructive
#6e1d0cmaroon
#d83818firebrick
Destructive foreground
#f7c0b6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#040301black
#040301black

Contrast

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

Light mode
Text on background18.81:1AAA
Text on card18.87:1AAA
Primary button9.48:1AAA
Secondary button6.22:1AA
Muted text8.37:1AAA
Accent7.47:1AAA
Destructive7.15:1AAA
Dark mode
Text on background18.80:1AAA
Text on card18.93:1AAA
Primary button9.48:1AAA
Secondary button6.22:1AA
Muted text8.98:1AAA
Accent7.47:1AAA
Destructive4.67:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.006 79.923);
  --foreground: oklch(0.156 0.02 83.188);
  --muted: oklch(0.946 0.002 26.452);
  --muted-foreground: oklch(0.388 0.027 27.059);
  --popover: oklch(0.982 0.009 79.916);
  --popover-foreground: oklch(0.141 0.018 86.435);
  --card: oklch(0.982 0.009 79.916);
  --card-foreground: oklch(0.141 0.018 86.435);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.097 0.011 86.701);
  --primary-foreground: oklch(0.759 0.102 78.169);
  --secondary: oklch(0.085 0.012 31.934);
  --secondary-foreground: oklch(0.657 0.128 28.832);
  --accent: oklch(0.103 0.015 113.006);
  --accent-foreground: oklch(0.686 0.14 116.029);
  --destructive: oklch(0.361 0.118 33.115);
  --destructive-foreground: oklch(0.855 0.065 31.387);
  --ring: oklch(0.097 0.011 86.701);
  --chart-1: oklch(0.097 0.011 86.701);
  --chart-2: oklch(0.085 0.012 31.934);
  --chart-3: oklch(0.103 0.015 113.006);
  --chart-4: oklch(0.137 0.021 31.2);
  --chart-5: oklch(0.097 0.012 87.03);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.151 0.011 81.616);
  --foreground: oklch(0.985 0.001 79.932);
  --muted: oklch(0.18 0.003 26.542);
  --muted-foreground: oklch(0.771 0.022 26.656);
  --popover: oklch(0.165 0.013 79.881);
  --popover-foreground: oklch(0.993 0 79.933);
  --card: oklch(0.165 0.013 79.881);
  --card-foreground: oklch(0.993 0 79.933);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.097 0.011 86.701);
  --primary-foreground: oklch(0.759 0.102 78.169);
  --secondary: oklch(0.085 0.012 31.934);
  --secondary-foreground: oklch(0.657 0.128 28.832);
  --accent: oklch(0.103 0.015 113.006);
  --accent-foreground: oklch(0.686 0.14 116.029);
  --destructive: oklch(0.582 0.201 32.861);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.097 0.011 86.701);
  --chart-1: oklch(0.097 0.011 86.701);
  --chart-2: oklch(0.085 0.012 31.934);
  --chart-3: oklch(0.103 0.015 113.006);
  --chart-4: oklch(0.137 0.021 31.2);
  --chart-5: oklch(0.097 0.012 87.03);
}