compare_screen
Compares an Android or iOS Simulator app screen with a Figma frame, reports position, size, text, color and visual differences, and suggests fixes.
Instructions
Compares the app's current screen on the device (Android or iOS Simulator) with a Figma frame. Matches Figma layers to app elements by visible text, name = AutomationId or position, and reports differences in position, size, text and background color. Non-text layers (buttons, fields, lines, icons, images) are found in the screenshot by how they look, comparing box, fill, corner radius, border and content. Reports fidelity (% of elements as in Figma, and how much it changed since the previous comparison) and how to fix each difference with the framework's properties. Generates report.html (interactive report to show the user), side_by_side.png and diff.png (in diff.png: green = matches, orange = differs, dotted blue = where Figma says it should be). Open the images for a visual review. If the screenshot doesn't look like the design (a loading screen), it waits and captures again up to 3 times.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | true to download the Figma frame again instead of using the local cache. Use it only if the design changed: each download uses Figma API quota. | |
| figmaUrl | Yes | Figma frame URL (Copy link to selection), must include ?node-id= | |
| framework | No | App framework, to write the suggestions with its properties: maui, android (XML views), compose, uikit, swiftui or flutter. Optional. | |
| tolerance | No | Position/size tolerance in dp or pt. Default 2. | |
| projectPath | No | App project folder. Optional: if it has files newer than the installed app, the report warns that the app needs to be rebuilt and reinstalled. | |
| deviceSerial | No | Device serial or UDID. Optional: uses the first one. | |
| colorTolerance | No | Color tolerance (RGB distance 0–441). Default 24. |