Mobile screenshot to React Native, SwiftUI & Flutter
Drop an iPhone or Android screenshot into Pixcel: it detects the device and pixel density (@2x/@3x), converts every colour, font size, radius and bound into points or dp, skips the status bar, and gives you a theme file plus a build brief for React Native, SwiftUI, Flutter or mobile web.
The 3× problem
Vibe-coding a mobile app from a screenshot usually fails in one specific way: everything is too big. An iPhone 15 screenshot is 1179 × 2556 pixels, but the screen is 393 × 852 points. Read the pixels literally and a 17pt row becomes 51, a 10pt radius becomes 30. Pixcel fixes the unit before your agent ever sees a number.
What you get for a phone screenshot
Detected: iPhone 15/16 · iOS · @3x (exact-match)
Logical canvas: 393 × 852 pt — every size below is in pt
System UI: top ≈ 59pt (status bar detected — do NOT build it), bottom ≈ 34pt
| text-1 | 35.5pt | bold | #000000 | "Settings"
| text-2 | 17pt | regular | #000000 | "Airplane Mode"
| text-3 | 17pt | regular | #8E8E93 | "Off"Theme files per stack
| Stack | File | Units |
|---|---|---|
| React Native / Expo | theme.ts | plain numbers (pt = dp) |
| SwiftUI | Theme.swift | points, Color(hex:) |
| Flutter | app_theme.dart | logical pixels, TextStyle |
| Mobile web | design-tokens.css / Tailwind | CSS px |
Step by step
- Drop the phone screenshot. Use the original iPhone or Android screenshot — do not resize it. Pixcel detects the device and its pixel density.
- Check the device line. The brief shows the detected device, density (@2x / @3x) and logical canvas, e.g. 393 × 852 pt. Override the density if you exported at a different scale.
- Pick your stack. Choose React Native (Expo), SwiftUI, Flutter or mobile web; the brief adds stack-specific rules (SafeAreaView, safe-area insets, ThemeData…).
- Export the theme. Download the theme file for your stack and give the brief to your coding agent.
From your IDE
With the Pixcel MCP server, run /mcp__pixcel__build-from-screenshot design-references/onboarding.png react-native-expo in Claude Code. The agent gets the measured brief, writes the screen, and can capture your Expo web preview at the same density to verify it.
Limits
- Resized or re-compressed screenshots lose the density signal — override it in the converter if needed.
- Font family is not identified; use SF Pro / Roboto or your app’s font.
- Font weight on @3x screenshots is reported as regular or bold, correct for 83.8% of words.
Questions
- Why do mobile rebuilds come out too big?
- Phone screenshots are captured at 2× or 3× pixel density. A 17pt label is 51 pixels tall in an iPhone screenshot, so an agent reading pixels builds it three times too large. Pixcel divides by the detected density so every value is in pt (iOS), dp (Android) or CSS px (mobile web).
- Which devices are recognised?
- Current and recent iPhones (including Pro and Pro Max sizes), common Android resolutions (1080p, 1440p, Pixel Pro), and iPads, in portrait and landscape. Unknown tall screenshots get a density estimate, and you can override it.
- Does it build the status bar?
- No. The time, battery and home indicator are system UI. Pixcel detects the status bar, leaves it out of the tokens and layout tree, and tells your agent to respect safe-area insets instead.
- How accurate is it on phone screenshots?
- On iPhone @3x screenshots: 98.2% of words recovered, 98.8% of font sizes within ±1pt, 96.3% of text colours within ΔE 3, and the device was identified correctly every time.