Comic for shadcn/ui

Comic is a shadcn/ui theme built around a near-white primary color (#fef5ff) with near-white accents (#f5fffe). The light mode uses a neutral background (#fefbfe). Dark mode keeps the near-white primary (#fef5ff) on a neutral background (#080208).

Color palette

TokenLightDark
Background
#fefbfewhite
#080208black
Foreground
#100311black
#fdfcfdwhite
Card
#fcf7fcsnow
#0c030cblack
Card foreground
#0c030dblack
#ffffffwhite
Popover
#fcf7fcsnow
#0c030cblack
Popover foreground
#0c030dblack
#ffffffwhite
Primary
#fef5ffghostwhite
#fef5ffghostwhite
Primary foreground
#520458indigo
#520458indigo
Secondary
#fffef5ivory
#fffef5ivory
Secondary foreground
#585204darkolivegreen
#585204darkolivegreen
Muted
#f3f3f1whitesmoke
#0e0e0cblack
Muted foreground
#515048darkslategray
#b7b6aedarkgray
Accent
#f5fffemintcream
#f5fffemintcream
Accent foreground
#045852darkslategray
#045852darkslategray
Destructive
#d50801red
#ef0901red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fef5ffghostwhite
#fef5ffghostwhite

Contrast

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

Light mode
Text on background19.60:1AAA
Text on card19.24:1AAA
Primary button13.01:1AAA
Secondary button7.89:1AAA
Muted text7.29:1AAA
Accent8.15:1AAA
Destructive5.42:1AA
Dark mode
Text on background20.06:1AAA
Text on card20.31:1AAA
Primary button13.01:1AAA
Secondary button7.89:1AAA
Muted text9.51:1AAA
Accent8.15:1AAA
Destructive4.47:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 323.657);
  --foreground: oklch(0.136 0.039 325.223);
  --muted: oklch(0.964 0.002 103.145);
  --muted-foreground: oklch(0.431 0.014 103.627);
  --popover: oklch(0.982 0.008 323.678);
  --popover-foreground: oklch(0.122 0.034 325.436);
  --card: oklch(0.982 0.008 323.678);
  --card-foreground: oklch(0.122 0.034 325.436);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.98 0.015 323.716);
  --primary-foreground: oklch(0.315 0.142 324.994);
  --secondary: oklch(0.995 0.011 103.297);
  --secondary-foreground: oklch(0.431 0.089 104.933);
  --accent: oklch(0.992 0.01 192.221);
  --accent-foreground: oklch(0.414 0.071 187.277);
  --destructive: oklch(0.55 0.223 29.517);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.98 0.015 323.716);
  --chart-1: oklch(0.98 0.015 323.716);
  --chart-2: oklch(0.995 0.011 103.297);
  --chart-3: oklch(0.992 0.01 192.221);
  --chart-4: oklch(1.003 0.006 283.009);
  --chart-5: oklch(0.98 0.016 323.719);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.107 0.027 325.45);
  --foreground: oklch(0.992 0.002 323.644);
  --muted: oklch(0.161 0.003 103.459);
  --muted-foreground: oklch(0.776 0.012 103.362);
  --popover: oklch(0.123 0.031 325.282);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.123 0.031 325.282);
  --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.98 0.015 323.716);
  --primary-foreground: oklch(0.315 0.142 324.994);
  --secondary: oklch(0.995 0.011 103.297);
  --secondary-foreground: oklch(0.431 0.089 104.933);
  --accent: oklch(0.992 0.01 192.221);
  --accent-foreground: oklch(0.414 0.071 187.277);
  --destructive: oklch(0.599 0.243 29.48);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.98 0.015 323.716);
  --chart-1: oklch(0.98 0.015 323.716);
  --chart-2: oklch(0.995 0.011 103.297);
  --chart-3: oklch(0.992 0.01 192.221);
  --chart-4: oklch(1.003 0.006 283.009);
  --chart-5: oklch(0.98 0.016 323.719);
}