Ascent for shadcn/ui

Ascent is a shadcn/ui theme built around a green primary color (#c0d4a0) with pink accents (#d4a0c0). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#c0d4a0) on a green-tinted background (#0b0e07).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0b0e07black
Foreground
#0f1405black
#fdfdfcwhite
Card
#fbfdf7snow
#0e1108black
Card foreground
#0c1004black
#ffffffwhite
Popover
#fbfdf7snow
#0e1108black
Popover foreground
#0c1004black
#ffffffwhite
Primary
#c0d4a0silver
#c0d4a0silver
Primary foreground
#242e15black
#242e15black
Secondary
#a0c0d4lightsteelblue
#a0c0d4lightsteelblue
Secondary foreground
#15242edarkslategray
#15242edarkslategray
Muted
#d6e0e5gainsboro
#1a2329black
Muted foreground
#636769dimgray
#969a9cdarkgray
Accent
#d4a0c0plum
#d4a0c0plum
Accent foreground
#2e1524black
#2e1524black
Destructive
#741702maroon
#fc5631tomato
Destructive foreground
#feb9aalightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c0d4a0silver
#c0d4a0silver

Contrast

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

Light mode
Text on background18.46:1AAA
Text on card18.75:1AAA
Primary button8.94:1AAA
Secondary button8.31:1AAA
Muted text4.25:1AA Large
Accent7.68:1AAA
Destructive6.85:1AA
Dark mode
Text on background19.11:1AAA
Text on card19.01:1AAA
Primary button8.94:1AAA
Secondary button8.31:1AAA
Muted text5.63:1AA
Accent7.68:1AAA
Destructive6.51:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.004 123.701);
  --foreground: oklch(0.181 0.031 125.729);
  --muted: oklch(0.9 0.013 234.715);
  --muted-foreground: oklch(0.51 0.006 234.676);
  --popover: oklch(0.99 0.008 123.763);
  --popover-foreground: oklch(0.165 0.027 124.76);
  --card: oklch(0.99 0.008 123.763);
  --card-foreground: oklch(0.165 0.027 124.76);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.843 0.073 124.981);
  --primary-foreground: oklch(0.284 0.045 126.269);
  --secondary: oklch(0.791 0.045 235.429);
  --secondary-foreground: oklch(0.252 0.028 236.71);
  --accent: oklch(0.764 0.075 341.513);
  --accent-foreground: oklch(0.237 0.048 343.59);
  --destructive: oklch(0.365 0.13 33.654);
  --destructive-foreground: oklch(0.846 0.083 33.021);
  --ring: oklch(0.843 0.073 124.981);
  --chart-1: oklch(0.843 0.073 124.981);
  --chart-2: oklch(0.791 0.045 235.429);
  --chart-3: oklch(0.764 0.075 341.513);
  --chart-4: oklch(0.815 0.04 235.281);
  --chart-5: oklch(0.847 0.079 125.081);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.016 124.41);
  --foreground: oklch(0.994 0.002 123.664);
  --muted: oklch(0.249 0.017 235.686);
  --muted-foreground: oklch(0.683 0.006 234.623);
  --popover: oklch(0.172 0.019 125.215);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.172 0.019 125.215);
  --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.843 0.073 124.981);
  --primary-foreground: oklch(0.284 0.045 126.269);
  --secondary: oklch(0.791 0.045 235.429);
  --secondary-foreground: oklch(0.252 0.028 236.71);
  --accent: oklch(0.764 0.075 341.513);
  --accent-foreground: oklch(0.237 0.048 343.59);
  --destructive: oklch(0.674 0.208 34.034);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.843 0.073 124.981);
  --chart-1: oklch(0.843 0.073 124.981);
  --chart-2: oklch(0.791 0.045 235.429);
  --chart-3: oklch(0.764 0.075 341.513);
  --chart-4: oklch(0.815 0.04 235.281);
  --chart-5: oklch(0.847 0.079 125.081);
}