Visual design & handoff

# Pixels vs points

Ludovic Delmas
November 6, 2020
##### Let’s first define pixels.

Pixel is short for picture element and it’s the smallest square sample of an image. The more samples or pixels, the more accurate representation of a picture.

Each pixel can only be one color at a time. Because they are so small, they seem to blend together to form complex images made of a wide variety of color blends. A 100 x 100px image is made of pixels in a grid 100 wide x 100 high, totaling 10,000 pixels.

With the introduction of high-resolution screens, the number of pixels that could be packed into a physical screen went up, which increased the number of pixels per inch.

##### This is where pixels start to get more complicated and where pixel density comes in.

Pixel density is the number of pixels that fit into an inch. To calculate pixel density, divide by 0 and make the universe implode. No, actually, divide the width of a device in pixels by the width of the device in inches. For example, a 100 x 100px image on a 1 x 1 inch screen has a pixel density of 100px per inch.

High-density screens have more pixels per inch than low-density screens. As a result, UI elements that have the same pixel dimensions appear larger on low-density screens, and smaller on high-density screens.

##### This is why Apple introduced logical resolution and its unit of measure, points.

Logical resolution is essentially what a device’s resolution would be if it didn’t have high resolution. Basically, we design for the smallest, standard screen size to allow us to scale our assets to the corresponding device resolutions.

Apple uses points as the unit of measure in logical resolution. A point is equal to a specific number of pixels depending on the screen resolution. Put simply, at 1x resolution, 1pt = 1px. At 2x resolution, 1pt = 4px because the resolution doubles both the X and Y values, so 2 x 2px. At 3x resolution, 1pt = 9px, which is 3 x 3px and so on. For example, the iPhone 11 measures at 375 x 812 points. Because it has such a high pixel density, it actually packs in 3 times that many pixels, so the true pixel dimensions are 1125 x 2436px.

Logical resolution ensures quality across high- and low-pixel density devices. It also prevents designers and developers from going completely insane by trying to figure out the different sizes of elements for different screens.

Google has a similar unit of measure called density-independent pixels (dps) pronounced dips. They’re not exactly the same as points and have a specific calculation to determine dps for a given screen size.

Regardless of points or dps, this means that everything you design will be designed at 1x. That way designs and assets for larger resolutions can be easily created from your 1x screens. Some screens call for .75x and 1.5x resolutions. This can be problematic because if an object has an odd number of pixels, it will render on the half-pixel causing blurriness.

This is why the 8pt grid system has become one of the primary spacing and sizing standards.