Pixel perfect
Lay a design mockup over a picture of the device screen, mark what is off and export one picture with everything.
Цей контент ще не доступний вашою мовою.
The Pixel perfect tab next to DevTools puts a design mockup over a picture of the device’s screen, so you can look at both closely, mark what is off and export one large picture for whoever owns it. Nothing is drawn over the device itself: it keeps working as usual.
An example: a shop screen checked against its mockup (tinted pink in these pictures). Three things differ, and each is marked and noted:
| # | What is off | How it was found |
|---|---|---|
| 1 | The Buy button is 4 px (1.3 dp) lower | Bright bands along its edges in Difference; the ruler gives the number |
| 2 | The price is #0F766E, the mockup has #0D9488 |
A faint glow in Difference although the shapes match; the loupe shows both colours |
| 3 | The divider under the header is missing | A bright line in Difference where the app has nothing |
The guide walks through it step by step.
References
Section titled “References”A reference is an image: SVG, PNG, JPEG or WebP, up to
pixelPerfect.maxFileSize (25 MiB). Add one by pasting it with ⌘V / Ctrl+V
while the tab is open, dropping it on the tab, or choosing a file from the
reference list.
An SVG needs a size: width and height on its root, or a viewBox, which
Figma always writes.
References belong to you, not to a session, so they are there in every
session; the ones added for the current app come first. They live in the
server’s storage (S3 or a folder). Each user has pixelPerfect.quota (1 GiB
by default; per user in the users auth mode), and a reference nobody opened
for pixelPerfect.maxAge (30 days) is deleted; comparing with it counts as
opening it, its thumbnail in the list doesn’t.
The list shows small previews (160 px wide, the top of tall frames) that the browser makes when you add an image, so opening the tab doesn’t download the full images; the server makes them for PNG, JPEG and WebP it got without one.
The frame icon in the dock opens the Pixel perfect page: all your references grouped by app, with search, the space they take and when they will be deleted; add, rename, download and delete them there.
The picture
Section titled “The picture”While the tab is open it takes a lossless screenshot of the device about once a second and shows it with the reference over it. Live shows how old the picture is; press it to pause and keep the current picture, for a toast or an animation that would otherwise be gone. Pictures are taken only while the tab is shown.
The reference is never stretched: it is as large as fits inside the area the padding leaves, and centred both ways (Fit). Width fills the width from the top instead, for a mockup taller than the screen.
| Control | What it does |
|---|---|
| Opacity | How strongly the reference shows, in steps of 5% |
| Blend | Normal; Difference: matching pixels turn black and anything off lights up; Invert: the reference inverted, so matching areas fade to grey |
| Loupe | A round magnifier over the pointer, like iOS shows when selecting text: ten times larger, with the pixel grid, the pointer’s pixel outlined, its coordinates and its colour |
These settings are remembered in the browser.
In Difference everything that matches is black. What still glows is off: here the missing divider, the price’s other shade and the two edges of the shifted button.
Zoom, pixel grid and ruler
Section titled “Zoom, pixel grid and ruler”The picture zooms and pans like a design tool. The bar in its corner has zoom out, the zoom in actual device pixels (100% is one device pixel per screen pixel; click it for 100%, again to fit), zoom in and fit, then the pixel grid and the ruler. Click the picture first for the keys.
| Action | How |
|---|---|
| Zoom around the pointer | ⌘ / Ctrl + wheel, or pinch on a trackpad |
| Zoom in, out, actual pixels, fit | +, −, 1, 0 |
| Pan | Wheel or two fingers; drag with Space held or with the middle button; on a saved frame, drag the picture |
| Pixel grid | G: lines between device pixels from 600%, on by default |
| Ruler | R: drag to measure; Shift keeps the line straight, Esc clears it |
The ruler snaps to pixel boundaries and shows the width and height in pixels, the length of a slanted line, and dp when the device’s density is known. The loupe hides once the picture is zoomed past it.
Padding
Section titled “Padding”Padding keeps the reference off the edges of the screen. It starts as the
device’s status and navigation bars, read from the window manager
(GET /v1/device/insets of the agent), so a mockup without system bars lies
between them. Change any edge in device pixels (the tab shows the same in dp
when it knows the density); System bars puts the measured values back.
The link buttons between the fields keep two opposite edges the same, as in
Figma: left and right are linked by default, top and bottom are not.
The padding is drawn over the picture as translucent hatched bands, blue or
red, with a dashed line along the area the reference fits into. Where the
reference doesn’t fill that area (a mockup of another shape, or a short one
fitted to the width), the uncovered part is cross-hatched in violet, so a
mockup that is too narrow or too short shows at once. The eye button hides
both; the export draws them too.
Marked areas
Section titled “Marked areas”Drag over the picture to mark a problem. A mark is numbered on the picture and listed next to it, where you can write what is wrong. Drag a mark to move it, any of its edges or corners to resize it (the selected one shows handles there); Delete or Backspace removes the selected one and the arrow keys move it by a pixel (10 with Shift). The cursor tells what a drag will do: a cross draws a new mark, four arrows move one, double arrows resize it, a hand pans. Marks are in device pixels and stay while the picture changes, until you clear them.
Export
Section titled “Export”Export downloads one JPEG at the device’s resolution (at least 1080 px a tile; smaller frames are enlarged pixel for pixel), on a light background under the Holtdroid logo, with the reference’s name, the app, its version, the device and the time, four tiles a row:
- the device with the padding and the marks, the reference on white, the difference, and the inverted reference over the device at 50%;
- the reference over the device at 25, 50, 75 and 100%;
- the difference blend at 25, 50, 75 and 100%;
- every marked area with its note, position and size, magnified (up to 24×) as the device, the reference, 50% and the difference, with the pixel grid drawn over it from 6×.
Saved into the recording
Section titled “Saved into the recording”While the session records, Save to recording keeps the comparison with the recording at that moment: the screenshot, the reference as it lay over it, the padding, the marks and the opacity and blend. A recording with saved frames isn’t deleted for being too short.
The recording’s Pixel perfect tab shows them as a stack of cards (or
says there are none). Open one to look at it the same way, with the opacity,
the blend, the padding and the loupe but nothing to move, jump to its moment,
and Save as image exports the same picture as the tab. The owner can
delete a frame there. They are part of a share link and of the downloaded
.holtdroid file too.
Configuration
Section titled “Configuration”pixelPerfect: enabled: true # the tab and its API; on by default quota: 1GiB # per user; 0 = no limit maxAge: 720h # deleted this long after it was last opened; 0 = never maxFileSize: 25MiB # largest image sweepInterval: 1h # how often retention runs storage: # optional: where references go; default is the shared storage under pixel-perfect/ type: s3 s3: endpoint: https://s3.example.com bucket: holtdroid prefix: pixel-perfect accessKey: env:S3_ACCESS_KEY secretKey: env:S3_SECRET_KEYWithout a storage of its own the references go to storage, which the Helm
chart puts on the cache volume, an emptyDir: give them an S3 prefix or a
persistent folder to keep them across restarts. Frames saved into recordings
are stored with the recording and count against recordings.quota.