UX Collective

We believe designers are thinkers as much as they are makers. https://linktr.ee/uxc

Follow publication

Member-only story

Pixel-snapping in icon design

Helena Zhang
UX Collective
Published in
7 min readJun 30, 2020

--

A scattering of pixels on a grid
More in the iconography series:Foundations of Iconography7 Principles of Icon Design5 Ways to Create a Settings IconIcon Grids & Keylines Demystified3 Classic Icon Families

We all want our designs to display sharp on all platforms, for all our users. To achieve this goal for digital icons, a best practice has held the standard: it is recommended to pixel-fit or pixel-snap icons to sit precisely on a pixel grid. This means that all strokes and shapes snap to 1px increments and are positioned on the pixel.

A comparison of a shape snapped to the pixel vs. the same shape off-pixel

Most icon guides and design systems advocate this in their specs — Google Material, Adobe Spectrum, IBM Carbon, and Firefox Photon to name a few.

The rationale is that because digital images are rendered to a matrix of pixels on screen, aligning elements to whole pixels produces sharper results; placing elements on subpixels or half pixels leads to fuzzier results.

Zooming in on a pixel-snapped icon reveals a sharper-looking render

Though curved and angled lines can’t perfectly conform to a square pixel, the idea is to get as close as possible.

A prohibit sign is snapped as close as possible to the grid

Makes sense, but I wanted to dig a little deeper. With today’s high resolution screens and potential non-integer scaling (e.g., from density-independent pixels), does this guidance still hold true? How important is pixel-snapping in practice? What effects do device, browser, file type, design software, and display magnification have on an icon’s render?

To answer these questions, I conducted a test.

Procedure

I created 4 test icons on a 48 x 48px canvas, using a 2px stroke and a range of straight lines and curves.

--

--