Rating for shadcn/ui

Rating is a shadcn/ui theme built around a vivid teal primary color (#07f2b8) with vivid yellow accents (#f2b807). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid teal primary (#07f2b8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#061310black
#f9fbfbghostwhite
Card
#ffffffwhite
#000000black
Card foreground
#061310black
#f9fbfbghostwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#061310black
#f9fbfbghostwhite
Primary
#07f2b8mediumspringgreen
#07f2b8mediumspringgreen
Primary foreground
#012d22black
#012d22black
Secondary
#b807f2darkviolet
#b807f2darkviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ddd8dfgainsboro
#252027darkslategray
Muted foreground
#525152darkslategray
#aeadaedarkgray
Accent
#f2b807orange
#f2b807orange
Accent foreground
#2d2201black
#2d2201black
Destructive
#b8120afirebrick
#f4342acrimson
Destructive foreground
#fef6f5lavenderblush
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#07f2b8mediumspringgreen
#07f2b8mediumspringgreen

Contrast

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

Light mode
Text on background18.94:1AAA
Text on card18.94:1AAA
Primary button10.32:1AAA
Secondary button4.82:1AA
Muted text5.62:1AA
Accent8.66:1AAA
Destructive6.29:1AA
Dark mode
Text on background20.21:1AAA
Text on card20.21:1AAA
Primary button10.32:1AAA
Secondary button4.82:1AA
Muted text7.12:1AAA
Accent8.66:1AAA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.175 0.021 176.411);
  --muted: oklch(0.888 0.011 317.742);
  --muted-foreground: oklch(0.436 0.003 317.752);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.175 0.021 176.411);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.175 0.021 176.411);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.855 0.174 167.302);
  --primary-foreground: oklch(0.263 0.05 171.445);
  --secondary: oklch(0.591 0.291 313.508);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.813 0.166 85.1);
  --accent-foreground: oklch(0.256 0.051 90.263);
  --destructive: oklch(0.498 0.196 29.444);
  --destructive-foreground: oklch(0.979 0.009 21.011);
  --ring: oklch(0.855 0.174 167.302);
  --chart-1: oklch(0.855 0.174 167.302);
  --chart-2: oklch(0.591 0.291 313.508);
  --chart-3: oklch(0.813 0.166 85.1);
  --chart-4: oklch(0.606 0.294 314.059);
  --chart-5: oklch(0.864 0.177 166.972);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.003 179.784);
  --muted: oklch(0.253 0.015 317.664);
  --muted-foreground: oklch(0.748 0.003 317.757);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.003 179.784);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.987 0.003 179.784);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.855 0.174 167.302);
  --primary-foreground: oklch(0.263 0.05 171.445);
  --secondary: oklch(0.591 0.291 313.508);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.813 0.166 85.1);
  --accent-foreground: oklch(0.256 0.051 90.263);
  --destructive: oklch(0.629 0.227 28.722);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.855 0.174 167.302);
  --chart-1: oklch(0.855 0.174 167.302);
  --chart-2: oklch(0.591 0.291 313.508);
  --chart-3: oklch(0.813 0.166 85.1);
  --chart-4: oklch(0.606 0.294 314.059);
  --chart-5: oklch(0.864 0.177 166.972);
}