Competent for shadcn/ui

Competent is a shadcn/ui theme built around a deep indigo primary color (#111038) with deep violet accents (#251038). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the deep indigo primary (#111038) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#030307black
Foreground
#050415black
#f6f6f9whitesmoke
Card
#f8f8fcghostwhite
#030307black
Card foreground
#050415black
#f6f6f9whitesmoke
Popover
#f8f8fcghostwhite
#030307black
Popover foreground
#050415black
#f6f6f9whitesmoke
Primary
#111038midnightblue
#111038midnightblue
Primary foreground
#9a98e2mediumpurple
#9a98e2mediumpurple
Secondary
#102238midnightblue
#102238midnightblue
Secondary foreground
#98bae2lightsteelblue
#98bae2lightsteelblue
Muted
#e1e3e5gainsboro
#1a1c1eblack
Muted foreground
#51565cdimgray
#a3a8aedarkgray
Accent
#251038midnightblue
#251038midnightblue
Accent foreground
#bf98e2plum
#bf98e2plum
Destructive
#c5370dfirebrick
#f04714orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#111038midnightblue
#111038midnightblue

Contrast

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

Light mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button6.90:1AA
Secondary button7.97:1AAA
Muted text5.74:1AA
Accent7.29:1AAA
Destructive5.35:1AA
Dark mode
Text on background19.08:1AAA
Text on card19.08:1AAA
Primary button6.90:1AA
Secondary button7.97:1AAA
Muted text7.13:1AAA
Accent7.29:1AAA
Destructive3.73:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.004 287.858);
  --foreground: oklch(0.125 0.039 281.21);
  --muted: oklch(0.914 0.003 251.481);
  --muted-foreground: oklch(0.452 0.011 251.638);
  --popover: oklch(0.981 0.004 287.858);
  --popover-foreground: oklch(0.125 0.039 281.21);
  --card: oklch(0.981 0.004 287.858);
  --card-foreground: oklch(0.125 0.039 281.21);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.203 0.075 278.788);
  --primary-foreground: oklch(0.709 0.107 284.833);
  --secondary: oklch(0.25 0.048 253.031);
  --secondary-foreground: oklch(0.778 0.068 252.066);
  --accent: oklch(0.227 0.076 305.76);
  --accent-foreground: oklch(0.741 0.112 308.251);
  --destructive: oklch(0.547 0.184 35.294);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.203 0.075 278.788);
  --chart-1: oklch(0.203 0.075 278.788);
  --chart-2: oklch(0.25 0.048 253.031);
  --chart-3: oklch(0.227 0.076 305.76);
  --chart-4: oklch(0.28 0.056 253.161);
  --chart-5: oklch(0.201 0.079 278.053);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.015 285.294);
  --foreground: oklch(0.974 0.003 287.874);
  --muted: oklch(0.225 0.005 251.621);
  --muted-foreground: oklch(0.729 0.01 251.557);
  --popover: oklch(0.101 0.015 285.294);
  --popover-foreground: oklch(0.974 0.003 287.874);
  --card: oklch(0.101 0.015 285.294);
  --card-foreground: oklch(0.974 0.003 287.874);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.203 0.075 278.788);
  --primary-foreground: oklch(0.709 0.107 284.833);
  --secondary: oklch(0.25 0.048 253.031);
  --secondary-foreground: oklch(0.778 0.068 252.066);
  --accent: oklch(0.227 0.076 305.76);
  --accent-foreground: oklch(0.741 0.112 308.251);
  --destructive: oklch(0.638 0.212 35.447);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.203 0.075 278.788);
  --chart-1: oklch(0.203 0.075 278.788);
  --chart-2: oklch(0.25 0.048 253.031);
  --chart-3: oklch(0.227 0.076 305.76);
  --chart-4: oklch(0.28 0.056 253.161);
  --chart-5: oklch(0.201 0.079 278.053);
}