Twine for shadcn/ui

Twine is a shadcn/ui theme built around a deep green primary color (#26751f) with deep green accents (#1f7543). The light mode uses a neutral background (#fbfefb). Dark mode keeps the deep green primary (#26751f) on a neutral background (#030803).

Color palette

TokenLightDark
Background
#fbfefbwhite
#030803black
Foreground
#000000black
#f6f9f6whitesmoke
Card
#fbfefbwhite
#030803black
Card foreground
#000000black
#f6f9f6whitesmoke
Popover
#fbfefbwhite
#030803black
Popover foreground
#000000black
#f6f9f6whitesmoke
Primary
#26751fforestgreen
#26751fforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#51751fdarkolivegreen
#51751fdarkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f0f2edwhitesmoke
#10120dblack
Muted foreground
#5c5c5cdimgray
#a3a3a3darkgray
Accent
#1f7543seagreen
#1f7543seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6b1500maroon
#ff582etomato
Destructive foreground
#ffb19elightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#26751fforestgreen
#26751fforestgreen

Contrast

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

Light mode
Text on background20.65:1AAA
Text on card20.65:1AAA
Primary button5.76:1AA
Secondary button5.37:1AA
Muted text5.95:1AA
Accent5.71:1AA
Destructive6.92:1AA
Dark mode
Text on background19.07:1AAA
Text on card19.07:1AAA
Primary button5.76:1AA
Secondary button5.37:1AA
Muted text7.47:1AAA
Accent5.71:1AA
Destructive6.67:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 143.115);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.959 0.008 125.156);
  --muted-foreground: oklch(0.474 0 198.435);
  --popover: oklch(0.994 0.004 143.115);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.004 143.115);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.496 0.142 141.925);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.517 0.12 129.558);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.499 0.113 153.196);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.347 0.123 34.642);
  --destructive-foreground: oklch(0.831 0.095 34.601);
  --ring: oklch(0.496 0.142 141.925);
  --chart-1: oklch(0.496 0.142 141.925);
  --chart-2: oklch(0.517 0.12 129.558);
  --chart-3: oklch(0.499 0.113 153.196);
  --chart-4: oklch(0.554 0.13 129.625);
  --chart-5: oklch(0.501 0.147 141.922);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.02 141.638);
  --foreground: oklch(0.979 0.005 143.108);
  --muted: oklch(0.178 0.012 125.973);
  --muted-foreground: oklch(0.716 0 165.964);
  --popover: oklch(0.122 0.02 141.638);
  --popover-foreground: oklch(0.979 0.005 143.108);
  --card: oklch(0.122 0.02 141.638);
  --card-foreground: oklch(0.979 0.005 143.108);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.496 0.142 141.925);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.517 0.12 129.558);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.499 0.113 153.196);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.681 0.21 34.841);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.496 0.142 141.925);
  --chart-1: oklch(0.496 0.142 141.925);
  --chart-2: oklch(0.517 0.12 129.558);
  --chart-3: oklch(0.499 0.113 153.196);
  --chart-4: oklch(0.554 0.13 129.625);
  --chart-5: oklch(0.501 0.147 141.922);
}