Only for shadcn/ui

Only is a shadcn/ui theme built around a violet primary color (#b99ce3) with green accents (#9ce3b9). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#b99ce3) on a violet-tinted background (#0a070e).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a070eblack
Foreground
#07040cblack
#f7f5f9whitesmoke
Card
#ffffffwhite
#0a070eblack
Card foreground
#07040cblack
#f7f5f9whitesmoke
Popover
#ffffffwhite
#0a070eblack
Popover foreground
#07040cblack
#f7f5f9whitesmoke
Primary
#b99ce3plum
#b99ce3plum
Primary foreground
#23113cmidnightblue
#23113cmidnightblue
Secondary
#e3b99cburlywood
#e3b99cburlywood
Secondary foreground
#3c2311black
#3c2311black
Muted
#edeae8linen
#171412black
Muted foreground
#504c49darkslategray
#b6b2afdarkgray
Accent
#9ce3b9palegreen
#9ce3b9palegreen
Accent foreground
#113c23darkgreen
#113c23darkgreen
Destructive
#a0370dsaddlebrown
#ec5418chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b99ce3plum
#b99ce3plum

Contrast

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

Light mode
Text on background20.35:1AAA
Text on card20.35:1AAA
Primary button7.31:1AAA
Secondary button8.12:1AAA
Muted text7.10:1AAA
Accent8.31:1AAA
Destructive6.88:1AA
Dark mode
Text on background18.51:1AAA
Text on card18.51:1AAA
Primary button7.31:1AAA
Secondary button8.12:1AAA
Muted text8.71:1AAA
Accent8.31:1AAA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.117 0.023 305.92);
  --muted: oklch(0.939 0.005 58.291);
  --muted-foreground: oklch(0.419 0.006 58.152);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.117 0.023 305.92);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.117 0.023 305.92);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.744 0.105 303.041);
  --primary-foreground: oklch(0.229 0.079 299.242);
  --secondary: oklch(0.816 0.063 57.24);
  --secondary-foreground: oklch(0.283 0.048 54.936);
  --accent: oklch(0.857 0.092 158.144);
  --accent-foreground: oklch(0.318 0.065 154.362);
  --destructive: oklch(0.484 0.148 38.649);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.744 0.105 303.041);
  --chart-1: oklch(0.744 0.105 303.041);
  --chart-2: oklch(0.816 0.063 57.24);
  --chart-3: oklch(0.857 0.092 158.144);
  --chart-4: oklch(0.838 0.055 57.424);
  --chart-5: oklch(0.741 0.111 302.918);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.135 0.018 304.673);
  --foreground: oklch(0.973 0.006 304.96);
  --muted: oklch(0.194 0.007 57.845);
  --muted-foreground: oklch(0.766 0.005 58.263);
  --popover: oklch(0.135 0.018 304.673);
  --popover-foreground: oklch(0.973 0.006 304.96);
  --card: oklch(0.135 0.018 304.673);
  --card-foreground: oklch(0.973 0.006 304.96);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.744 0.105 303.041);
  --primary-foreground: oklch(0.229 0.079 299.242);
  --secondary: oklch(0.816 0.063 57.24);
  --secondary-foreground: oklch(0.283 0.048 54.936);
  --accent: oklch(0.857 0.092 158.144);
  --accent-foreground: oklch(0.318 0.065 154.362);
  --destructive: oklch(0.645 0.198 38.565);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.744 0.105 303.041);
  --chart-1: oklch(0.744 0.105 303.041);
  --chart-2: oklch(0.816 0.063 57.24);
  --chart-3: oklch(0.857 0.092 158.144);
  --chart-4: oklch(0.838 0.055 57.424);
  --chart-5: oklch(0.741 0.111 302.918);
}