Clear for shadcn/ui

Clear is a shadcn/ui theme built around a green primary color (#85a545) with violet accents (#6545a5). The light mode uses a neutral background (#fafcf8). Dark mode keeps the green primary (#85a545) on a green-tinted background (#0c0e06).

Color palette

TokenLightDark
Background
#fafcf8snow
#0c0e06black
Foreground
#030401black
#ffffffwhite
Card
#f8faf5whitesmoke
#0e1208black
Card foreground
#000000black
#ffffffwhite
Popover
#f8faf5whitesmoke
#0e1208black
Popover foreground
#000000black
#ffffffwhite
Primary
#85a545olivedrab
#85a545olivedrab
Primary foreground
#111609black
#111609black
Secondary
#6545a5rebeccapurple
#6545a5rebeccapurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#dddbe1gainsboro
#201e24black
Muted foreground
#5c5766dimgray
#9e99a8darkgray
Accent
#6545a5rebeccapurple
#6545a5rebeccapurple
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#792f06saddlebrown
#f36012orangered
Destructive foreground
#fbceb6peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#85a545olivedrab
#85a545olivedrab

Contrast

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

Light mode
Text on background19.87:1AAA
Text on card19.96:1AAA
Primary button6.56:1AA
Secondary button7.09:1AAA
Muted text5.08:1AA
Accent7.09:1AAA
Destructive6.58:1AA
Dark mode
Text on background19.41:1AAA
Text on card18.96:1AAA
Primary button6.56:1AA
Secondary button7.09:1AAA
Muted text5.92:1AA
Accent7.09:1AAA
Destructive6.48:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.004 121.565);
  --foreground: oklch(0.103 0.017 121.109);
  --muted: oklch(0.895 0.007 301.36);
  --muted-foreground: oklch(0.466 0.025 300.633);
  --popover: oklch(0.982 0.007 121.602);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.007 121.602);
  --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.678 0.129 125.17);
  --primary-foreground: oklch(0.19 0.025 123.717);
  --secondary: oklch(0.476 0.149 295.573);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.476 0.149 295.573);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.405 0.114 43.245);
  --destructive-foreground: oklch(0.885 0.06 49.856);
  --ring: oklch(0.678 0.129 125.17);
  --chart-1: oklch(0.678 0.129 125.17);
  --chart-2: oklch(0.476 0.149 295.573);
  --chart-3: oklch(0.476 0.149 295.573);
  --chart-4: oklch(0.498 0.157 295.519);
  --chart-5: oklch(0.687 0.137 125.415);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.158 0.018 122.51);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.241 0.01 300.806);
  --muted-foreground: oklch(0.692 0.023 300.969);
  --popover: oklch(0.174 0.02 123.278);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.174 0.02 123.278);
  --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.678 0.129 125.17);
  --primary-foreground: oklch(0.19 0.025 123.717);
  --secondary: oklch(0.476 0.149 295.573);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.476 0.149 295.573);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.67 0.195 42.275);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.678 0.129 125.17);
  --chart-1: oklch(0.678 0.129 125.17);
  --chart-2: oklch(0.476 0.149 295.573);
  --chart-3: oklch(0.476 0.149 295.573);
  --chart-4: oklch(0.498 0.157 295.519);
  --chart-5: oklch(0.687 0.137 125.415);
}