Credibility for shadcn/ui

Credibility is a shadcn/ui theme built around a vivid violet primary color (#ab58f9) with vivid purple accents (#f958f6). The light mode uses a neutral background (#faf8fc). Dark mode keeps the vivid violet primary (#ab58f9) on a neutral background (#050208).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#050208black
Foreground
#030104black
#f7f4fawhitesmoke
Card
#faf8fcghostwhite
#050208black
Card foreground
#030104black
#f7f4fawhitesmoke
Popover
#faf8fcghostwhite
#050208black
Popover foreground
#030104black
#f7f4fawhitesmoke
Primary
#ab58f9mediumorchid
#ab58f9mediumorchid
Primary foreground
#000000black
#000000black
Secondary
#5a58f9mediumslateblue
#5a58f9mediumslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e2e2e9gainsboro
#16161dblack
Muted foreground
#4a4a4fdarkslategray
#b0b0b5darkgray
Accent
#f958f6violet
#f958f6violet
Accent foreground
#1e011dblack
#1e011dblack
Destructive
#a02d03saddlebrown
#fa5519orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ab58f9mediumorchid
#ab58f9mediumorchid

Contrast

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

Light mode
Text on background19.70:1AAA
Text on card19.70:1AAA
Primary button5.48:1AA
Secondary button5.01:1AA
Muted text6.83:1AA
Accent7.18:1AAA
Destructive7.31:1AAA
Dark mode
Text on background18.90:1AAA
Text on card18.90:1AAA
Primary button5.48:1AA
Secondary button5.01:1AA
Muted text8.33:1AAA
Accent7.18:1AAA
Destructive6.39:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 309.07);
  --foreground: oklch(0.078 0.022 311.26);
  --muted: oklch(0.915 0.01 286.976);
  --muted-foreground: oklch(0.412 0.008 286.829);
  --popover: oklch(0.982 0.005 309.07);
  --popover-foreground: oklch(0.078 0.022 311.26);
  --card: oklch(0.982 0.005 309.07);
  --card-foreground: oklch(0.078 0.022 311.26);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.635 0.232 304.263);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.562 0.233 276.6);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.73 0.259 328.521);
  --accent-foreground: oklch(0.166 0.071 328.873);
  --destructive: oklch(0.471 0.157 36.555);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.635 0.232 304.263);
  --chart-1: oklch(0.635 0.232 304.263);
  --chart-2: oklch(0.562 0.233 276.6);
  --chart-3: oklch(0.73 0.259 328.521);
  --chart-4: oklch(0.597 0.213 278.492);
  --chart-5: oklch(0.633 0.238 304.04);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.102 0.024 310.874);
  --foreground: oklch(0.972 0.009 309.033);
  --muted: oklch(0.203 0.014 285.835);
  --muted-foreground: oklch(0.759 0.006 287.013);
  --popover: oklch(0.102 0.024 310.874);
  --popover-foreground: oklch(0.972 0.009 309.033);
  --card: oklch(0.102 0.024 310.874);
  --card-foreground: oklch(0.972 0.009 309.033);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.635 0.232 304.263);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.562 0.233 276.6);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.73 0.259 328.521);
  --accent-foreground: oklch(0.166 0.071 328.873);
  --destructive: oklch(0.669 0.211 37.499);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.635 0.232 304.263);
  --chart-1: oklch(0.635 0.232 304.263);
  --chart-2: oklch(0.562 0.233 276.6);
  --chart-3: oklch(0.73 0.259 328.521);
  --chart-4: oklch(0.597 0.213 278.492);
  --chart-5: oklch(0.633 0.238 304.04);
}