Attractive for shadcn/ui

Attractive is a shadcn/ui theme built around a light yellow primary color (#f9f7f1) with muted light yellow accents (#e0ddd2). The light mode uses a neutral background (#fcfbf8). Dark mode keeps the light yellow primary (#f9f7f1) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#fcfbf8snow
#030302black
Foreground
#171303black
#faf9f4whitesmoke
Card
#fcfbf8snow
#030302black
Card foreground
#171303black
#faf9f4whitesmoke
Popover
#fcfbf8snow
#030302black
Popover foreground
#171303black
#faf9f4whitesmoke
Primary
#f9f7f1whitesmoke
#f9f7f1whitesmoke
Primary foreground
#383219darkslategray
#383219darkslategray
Secondary
#e0ddd2gainsboro
#21201cblack
Secondary foreground
#4b4734darkolivegreen
#bdbbb3silver
Muted
#e8e2c9gainsboro
#362f17darkslategray
Muted foreground
#5b5a57dimgray
#a8a7a4darkgray
Accent
#e0ddd2gainsboro
#21201cblack
Accent foreground
#4b4734darkolivegreen
#bdbbb3silver
Destructive
#881801darkred
#fd411corangered
Destructive foreground
#fec8bdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9f7f1whitesmoke
#f9f7f1whitesmoke

Contrast

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

Light mode
Text on background17.93:1AAA
Text on card17.93:1AAA
Primary button11.96:1AAA
Secondary button6.85:1AA
Muted text5.30:1AA
Accent6.85:1AA
Destructive6.51:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button11.96:1AAA
Secondary button8.49:1AAA
Muted text5.52:1AA
Accent8.49:1AAA
Destructive3.53:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 95.081);
  --foreground: oklch(0.186 0.032 97.111);
  --muted: oklch(0.911 0.033 95.423);
  --muted-foreground: oklch(0.468 0.005 95.149);
  --popover: oklch(0.988 0.004 95.081);
  --popover-foreground: oklch(0.186 0.032 97.111);
  --card: oklch(0.988 0.004 95.081);
  --card-foreground: oklch(0.186 0.032 97.111);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.976 0.008 95.134);
  --primary-foreground: oklch(0.317 0.04 95.731);
  --secondary: oklch(0.896 0.015 95.226);
  --secondary-foreground: oklch(0.396 0.03 95.709);
  --accent: oklch(0.896 0.015 95.226);
  --accent-foreground: oklch(0.396 0.03 95.709);
  --destructive: oklch(0.407 0.15 32.675);
  --destructive-foreground: oklch(0.878 0.064 31.367);
  --ring: oklch(0.976 0.008 95.134);
  --chart-1: oklch(0.976 0.008 95.134);
  --chart-2: oklch(0.896 0.015 95.226);
  --chart-3: oklch(0.896 0.015 95.226);
  --chart-4: oklch(0.917 0.012 95.185);
  --chart-5: oklch(0.977 0.009 95.142);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.007 97.82);
  --foreground: oklch(0.982 0.006 95.111);
  --muted: oklch(0.307 0.04 95.711);
  --muted-foreground: oklch(0.728 0.004 95.101);
  --popover: oklch(0.097 0.007 97.82);
  --popover-foreground: oklch(0.982 0.006 95.111);
  --card: oklch(0.097 0.007 97.82);
  --card-foreground: oklch(0.982 0.006 95.111);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.976 0.008 95.134);
  --primary-foreground: oklch(0.317 0.04 95.731);
  --secondary: oklch(0.243 0.006 95.33);
  --secondary-foreground: oklch(0.79 0.011 95.199);
  --accent: oklch(0.243 0.006 95.33);
  --accent-foreground: oklch(0.79 0.011 95.199);
  --destructive: oklch(0.654 0.228 32.794);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.976 0.008 95.134);
  --chart-1: oklch(0.976 0.008 95.134);
  --chart-2: oklch(0.243 0.006 95.33);
  --chart-3: oklch(0.243 0.006 95.33);
  --chart-4: oklch(0.276 0.008 95.347);
  --chart-5: oklch(0.977 0.009 95.142);
}