Scientific for shadcn/ui

Scientific is a shadcn/ui theme built around a near-black primary color (#050505) with muted light green accents (#ced5c8). The light mode uses a neutral background (#fcfefb). Dark mode keeps the near-black primary (#050505) on a green-tinted background (#0a1004).

Color palette

TokenLightDark
Background
#fcfefbwhite
#0a1004black
Foreground
#000000black
#fcfdfcwhite
Card
#fafcf8snow
#0c1405black
Card foreground
#000000black
#ffffffwhite
Popover
#fafcf8snow
#0c1405black
Popover foreground
#000000black
#ffffffwhite
Primary
#050505black
#050505black
Primary foreground
#9ea09cdarkgray
#9ea09cdarkgray
Secondary
#dbded9gainsboro
#283021darkslategray
Secondary foreground
#42473edarkslategray
#c1cdb7silver
Muted
#e4f0dbbeige
#18240fblack
Muted foreground
#606d54dimgray
#9dab92darkseagreen
Accent
#ced5c8lightgrey
#415431darkolivegreen
Accent foreground
#353d2fdarkslategray
#dae5d2gainsboro
Destructive
#bd2c00firebrick
#f03800orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#050505black
#050505black

Contrast

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

Light mode
Text on background20.67:1AAA
Text on card20.35:1AAA
Primary button7.72:1AAA
Secondary button7.01:1AAA
Muted text4.66:1AA
Accent7.50:1AAA
Destructive5.97:1AA
Dark mode
Text on background18.91:1AAA
Text on card18.76:1AAA
Primary button7.72:1AAA
Secondary button8.24:1AAA
Muted text6.69:1AA
Accent6.39:1AA
Destructive3.99:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 130.469);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.94 0.03 130.737);
  --muted-foreground: oklch(0.517 0.042 131.239);
  --popover: oklch(0.988 0.007 130.5);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.007 130.5);
  --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.116 0.001 130.386);
  --primary-foreground: oklch(0.703 0.006 130.519);
  --secondary: oklch(0.896 0.007 130.515);
  --secondary-foreground: oklch(0.39 0.017 130.849);
  --accent: oklch(0.864 0.019 130.642);
  --accent-foreground: oklch(0.346 0.026 131.166);
  --destructive: oklch(0.522 0.186 34.361);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.116 0.001 130.386);
  --chart-1: oklch(0.116 0.001 130.386);
  --chart-2: oklch(0.896 0.007 130.515);
  --chart-3: oklch(0.864 0.019 130.642);
  --chart-4: oklch(0.919 0.006 130.496);
  --chart-5: oklch(0.117 0.002 130.308);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.162 0.028 130.42);
  --foreground: oklch(0.993 0.002 130.456);
  --muted: oklch(0.242 0.04 132.263);
  --muted-foreground: oklch(0.722 0.039 130.957);
  --popover: oklch(0.179 0.032 131.543);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.179 0.032 131.543);
  --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.116 0.001 130.386);
  --primary-foreground: oklch(0.703 0.006 130.519);
  --secondary: oklch(0.297 0.028 131.382);
  --secondary-foreground: oklch(0.832 0.033 130.815);
  --accent: oklch(0.419 0.059 131.95);
  --accent-foreground: oklch(0.908 0.027 130.722);
  --destructive: oklch(0.623 0.225 33.904);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.116 0.001 130.386);
  --chart-1: oklch(0.116 0.001 130.386);
  --chart-2: oklch(0.297 0.028 131.382);
  --chart-3: oklch(0.419 0.059 131.95);
  --chart-4: oklch(0.331 0.032 131.421);
  --chart-5: oklch(0.117 0.002 130.308);
}