Measure Screenshot
measure_screenshotMeasure a PNG screenshot's true palette, WCAG contrast ratios, whitespace, and layout alignment issues, each with confidence levels. Return a markdown or HTML report to support UI critiques with concrete numbers.
Instructions
Measure a real screenshot from its actual pixels — the exact palette and how many distinct colours it really uses, true WCAG contrast ratios for the colour pairs on screen, whitespace/density, and structural detections (left-edge alignment, vertical rhythm, off-grid gaps) each carrying a confidence level. Returns a markdown measurement and, on request, a self-contained HTML report you can save, open and share. PNG only. Reads the local file you name; makes no network call. Use it before critiquing a UI so the review cites measured numbers instead of impressions; pair with fix_contrast for failing pairs and audit_design_system for the codebase behind the screen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a .png screenshot. Absolute paths are strongly preferred — a relative path is resolved against the server's working directory, which is usually not your project folder. | |
| scale | No | Device pixel ratio of the screenshot (default 1). Pass 2 for a Retina/2× capture so lengths are reported in logical px instead of image px. | |
| format | No | 'markdown' (default) for the measurement text, 'html' for a self-contained report document to save and open, 'both' for each. | |
| max_colors | No | How many palette clusters to list (default 12). |