βββββββ βββββββββββββββββββ βββββββ ββββ βββ
βββββββββββββββββββββββββββββββββββ βββββ βββ
βββ βββββββββ ββββββββββββββ ββββββββββ βββ
βββ βββββββββ ββββββββββββββ βββββββββββββ
βββββββββββββββββββββββββββββββββββββββ ββββββ
βββββββ βββββββββββββββββββ βββββββ βββ βββββ
A U D I T O R
One command. 9 audit modules. A score from 0 to 100.
design-auditor opens any website in a real Chromium browser, inspects every element's computed styles, and scores design consistency across 9 modules β typography, colors, spacing, components, readability, images, links, headings, and breakpoints.
npx design-auditor https://stripe.comThink of it as Lighthouse, but for your design system β not performance, not SEO, but the visual coherence of your product.
| Tool | What it checks |
|---|---|
| Lighthouse | Performance, SEO, best practices |
| axe / WAVE | Accessibility compliance |
| Stylelint | CSS source code linting |
| design-auditor | Design system consistency β the gap no one else fills |
# No installation needed
npx design-auditor https://stripe.com
# Audit only specific modules
npx design-auditor https://stripe.com --only colors,typography
# Local dev server
npx design-auditor http://localhost:3000 --local
# Save JSON report for CI
npx design-auditor https://stripe.com --save-reportEvery audit produces a weighted score from 0 to 100 with a letter grade:
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DESIGN AUDIT SCORE β
β β
β 72 / 100 β Grade B (Good) β
β β
β Typography ββββββββββ 82 (weight 15%) β
β Colors ββββββββββ 60 (weight 20%) β
β Rhythm & Spacing ββββββββββ 78 (weight 15%) β
β Components ββββββββββ 65 (weight 15%) β
β Reading Width ββββββββββ 90 (weight 10%) β
β Images ββββββββββ 80 (weight 10%) β
β Links ββββββββββ 85 (weight 5%) β
β Headings ββββββββββ 100 (weight 5%) β
β Breakpoints ββββββββββ 70 (weight 5%) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Grade | Score | Meaning |
|---|---|---|
| A | 90-100 | Excellent β consistent design system |
| B | 75-89 | Good β minor inconsistencies |
| C | 60-74 | Needs Work β visible design drift |
| D | 40-59 | Poor β significant inconsistencies |
| F | 0-39 | Critical β no design system detected |
Use --save-report to track your score over time and catch design drift in CI.
Good type is invisible. Bad type is everywhere.
- Font family count (recommended: β€ 3)
- Unique font sizes and modular scale adherence
- Line-height consistency across text elements
- Outlier sizes that break the visual rhythm
A brand is not a logo. It's a consistent palette.
- Unique color count across the entire page
- Similar shade clustering using delta-E color science
- Auto-detection of primary / secondary / accent colors by usage frequency
- WCAG AA contrast validation for all text/background pairs
- CSS variable coverage β are colors tokenized or hardcoded?
The baseline grid is the heartbeat of a layout.
- Rhythm unit detection
(font-size x line-height) - Line-heights as multiples of the rhythm unit
- 4px / 8px grid adherence for margins and paddings
- Outlier spacing values like
13px,17px,22px
Inconsistent buttons are a symptom of an inconsistent system.
- Touch target sizes (minimum 44x44px per WCAG 2.5.5)
- Button padding variations (recommended: β€ 3 sizes β sm/md/lg)
:hoverand:focusinteractive states- Border-radius system (recommended: β€ 5 values)
- Box-shadow elevation levels and light direction consistency
- Z-index organization and "magic numbers"
If a line is too long, the reader's eye has a hard time finding the next line.
- Average line character count (optimal: 45-75 characters)
- Percentage of text blocks within optimal reading width
- Flags text containers that are too wide (>80 chars) or too narrow (<30 chars)
Every image without alt text is a door slammed on a screen reader user.
- Alt text coverage (error if >30% missing)
- Aspect ratio consistency (recommended: β€ 3 unique ratios)
- Inconsistent ratios within component groups (e.g. cards with mixed image proportions)
A link distinguished only by color is invisible to 8% of men.
- WCAG 1.4.1 β links must not rely on color alone (needs underline or other indicator)
- Link color consistency across the page
:visitedstate defined:focusstate for keyboard navigation (WCAG 2.4.7)
Headings are the table of contents your DOM never knew it had.
- Exactly one
<h1>per page - Logical heading order (no skipped levels like H2 β H4)
- Visual size hierarchy β higher-level headings must appear larger
- Deep nesting warnings (excessive H5/H6 usage)
A responsive design without a breakpoint system is just a flexible mess.
- Known system detection (Bootstrap, Tailwind, etc.)
- Breakpoint count (recommended: 4-6, error if >8)
- Strategy check β mobile-first vs desktop-first vs mixed
- Non-standard breakpoint values
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TYPOGRAPHY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
Font families: 2 β OK
β οΈ Font sizes: 11 unique β recommended β€ 8
Found: 12px 14px 16px 18px 22px 24px 32px 40px 48px 56px 64px
β Line-heights: 22 unique β no vertical rhythm
Too many line-height values β no baseline grid detected
COLORS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 54 unique colors found β recommended < 20
β 40 similar color pairs β palette can be consolidated
ββ #f0f6fc β ββ #f6f8fa (ΞE=2.6)
ββ #24292f β ββ #1f2328 (ΞE=2.9)
β
Primary: ββ #79c0ff (262 uses)
β
Secondary: ββ #59636e (100 uses)
β
Color balance: 63% / 24% / 2% β close to 60/30/10 rule
COMPONENTS
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 28/50 buttons smaller than 44px touch target (56%)
"Sign up" 101Γ32px, "Explore" 94Γ36px
β οΈ Buttons: 11 padding variations β recommended β€ 3
β
Interactive states: :hover and :focus present
β 12 unique border-radius values β recommended β€ 5
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SCORE: 72 / 100 β Grade B (Good)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Every color is rendered as a live color swatch right in your terminal.
URL β Playwright opens a real Chromium browser
β
βββ page.evaluate() β runs inside the browser
β βββ getComputedStyle() on every element
β returns actual rendered values
β
βββ 9 Extractors collect raw data
β βββ typography.ts β fonts, sizes, line-heights
β βββ colors.ts β delta-E clustering, WCAG contrast
β βββ rhythm.ts β spacing, margins, grid detection
β βββ components.ts β buttons, shadows, z-index
β βββ reading-width.ts β line character counts
β βββ images.ts β alt text, aspect ratios
β βββ links.ts β states, color-only distinction
β βββ headings.ts β hierarchy, visual sizing
β βββ breakpoints.ts β media query analysis
β
βββ Rules engine evaluates violations (pass / warn / error)
β
βββ Score calculator β weighted 0-100 score + grade
Unlike static CSS analysis, design-auditor uses a real browser β so it sees computed styles, not source code. It catches values injected by JavaScript, CSS custom properties resolved at runtime, and styles applied by third-party scripts.
design-auditor <url> [options]
Arguments:
url Website URL to audit
Options:
--only <modules> Run specific modules only
Values: typography, colors, spacing, components,
reading-width, images, links, headings, breakpoints
--save-report Save full report as JSON file
--local Optimize for local dev servers (disables networkidle)
-V, --version Show version number
-h, --help Show helpWith --save-report, the full audit is saved as structured JSON β perfect for CI pipelines, dashboards, or tracking design drift over time.
{
"url": "https://stripe.com",
"date": "2026-02-27T10:00:00.000Z",
"score": {
"overall": 72,
"grade": "B",
"label": "Good"
},
"summary": {
"pass": 7,
"warn": 5,
"error": 3
},
"modules": [
{
"name": "Colors",
"score": 60,
"weight": 20,
"violations": [
{
"id": "too-many-colors",
"severity": "error",
"message": "54 unique colors found β recommended < 20",
"hint": "A large palette makes maintenance harder..."
}
]
}
]
}A design system is a set of constraints. Audit tools should enforce them.
Most automated tools check if your site works (Lighthouse) or if it's accessible (axe). design-auditor checks if your site is consistent β the thing that's hardest to maintain as teams grow.
Based on established standards:
- WCAG 2.1 / 2.5.5 β touch targets, contrast ratios, link distinction
- 8-Point Grid System β spacing consistency
- Modular Scale β typographic hierarchy
- CIE delta-E β perceptual color similarity
- 60-30-10 rule β color balance
# Run without installing
npx design-auditor https://stripe.com
# Or install globally
npm install -g design-auditor
design-auditor https://stripe.comRequirements: Node.js 20+
Contributions are welcome! Whether it's a bug fix, a new audit rule, or an improvement to an existing module β open an issue or submit a PR.
git clone https://github.com/PashaSchool/design-auditor.git
cd design-auditor
npm install
npx playwright install chromium
npm run dev -- https://example.comSee open issues for ideas on where to start.
- Audits only the first page at the given URL (no multi-page crawl yet)
- JavaScript-heavy SPAs may need a few seconds to fully render β use
--localfor dev servers - Media query analysis reads CSS source rules; dynamically injected media queries may be missed
- Color extraction uses computed styles β colors set via
canvas,svg, orbackground-imagegradients are not captured - Contrast checking covers text on elements with an explicit background color; text over inherited/transparent backgrounds or images is skipped
All dependencies are continuously scanned for vulnerabilities using Snyk.
MIT β use it, fork it, build on it.
Built with care for designers who care about consistency.
