Sketch Measure Plugin Tutorial
By itself, Sketch does a good job of showing measurements when you're moving or resizing a layer, but if you want to know your measurements without moving anything, the Measure plugin is a great tool.
How to install
The easiest way to install Measure is:
In Sketch, go to Plugins > Manage Plugins
and you'll see this panel:
Click on the little gear near the bottom. You'll see the menu item "Show Plugins Folder." Select that.
Copy the Measure plugin (not the whole zip) into the Plugins folder.
Save your current Sketch file or restart Sketch to start using Measure.
All Menu Items
For a plugin, Measure has a lot of features.
Let's go over all of them, one by one.
The word "overlay" can mean a few different things. In Sketch, an overlay can mean a popup, alert, or lightbox over a background. Here's one example of an overlay:
However, with the Measure plugin, creating an "overlay" simply creates a layer on top of whatever you've selected, and it's the same size as what you've selected. Here's a selected layer:
1) creates a little overlay layer.
It's simply a layer, the same size as your selection, filled with a beige color with an opacity of 30%.
To measure the size of a layer, start by selecting it.
Then either press
2) or select "2. Measure Size" from the Plugins > Measure menu.
The size measurements of that layer will then appear. You might have to deselect the layer to read the numbers.
By measuring layers one by one, you can display multiple measurements.
When you want those measurements to go away, you hide them by:
Choosing "Toggle measure hidden" from the plugin menu
Deleting the measurement layers (the top two in this case). This, of course, deletes the measurements instead of just hiding them.
To measure the space between two layers, select them both.
3) or choose "Measure spacing" from the dropdown menu.
The aqua color makes it a little hard to see the numbers, but it's still legible.
You can also select two layers, where one is inside the other.
Get Property is a nice way to display all the information you want about a layer. Here, I've selected the text layer "Bethany" and pressed
Click "OK" and get this result:
Creating a note simply reformats an already-existing text layer. Here, I've created a little text layer.
If you press
5), you get a reformatted layer that looks more like a note.
Percentage for Size
Predictably, this measures a layer's width and height as a percentage of the total image.
If you select a layer and press
6), you get something that looks like this:
You can display sizes by both percentage and direct size measurements.
Percentage for Spacing
Like Percentage for Size, this measures the distance between the edges of two layers as a percentage of the whole image.
If you select two layers and press
7), you get something like this:
Toggle Measure Hidden
You can hide and show all of the Measure layers with
H). If you have too many measurements visible, like this:
⌃⇧H to make them disappear.
All this function actually does is to hide all the Measure-created layers. Here they are, at the top:
...and here they are, hidden.
Toggle Measure Locked
Like "Toggle measure hidden," locking the Measure layers means they can't be changed until they're unlocked.
L) to lock/unlock.
Lite Width and Lite Height
These two options delete the selected layer, replacing it with a measurement of that layer's height or width.
Let's select the frog.
[) for Lite Width. The result:
No more frog, but you know how wide he used to be.
Z) to undo and bring the frog back.
]) for Lite Height. The result:
As with Lite Width, the frog layer itself is deleted, with only a Measure layer showing its height left behind.
The Color Palette menu option requires a little more up-front work before you can use it.
You have to select one or more artboards, and then choose Color Palette.
First, you have to have an artboard with color in it (images don't count). Here's an iPhone 6 artboard with a simple color gradient.
Select it by clicking on the artboard's name "iPhone 6."
Then choose Plugins > Measure > Color Palette
Measure will create a separate page called "Sketch Measure".
It only cares about the set colors in our gradient, not all the in-between colors.
You can add to this Color Palette by selecting another artboard. Go ahead and select our original artboard.
Choose Color Palette again, and you'll see this:
Color Palette kept the original red and blue colors and added three colors from the other artboard:
- black (from the background)
- gray (from the image masks)
- white (from the text).
Notice that the colors from the animal images were ignored.
Color Palette and Opacity
Color Palette has some trouble with non-opaque colors. For example, if you change the red color in the gradient to 50% opacity, like this:
And then run Color Palette, you get this:
There's nothing in the Palette that shows we have a non-opaque red color in an artboard.
Fixing this requires a little workaround. To get Color Palette to recognize an opacity, you have to either
- create a new color, or
- resize the shape where you altered the color.
Go ahead and create a rectangle with a 50% opacity green color, and resize the original gradient.
Run Color Palette.
Aha! There they are.
Spec Export creates an HTML page of an artboard, which you can then either send to a client directly or post on a web site.
To see it in action, select our original artboard.
E) or select Plugins > Measure > Spec Export.
This will save a folder with some files in it.
Open up "Tablet Portrait.html" in a browser.
You can also click on an item in the spec to get its details.
The developer of Sketch Measure says that Spec Export is still in beta, so it may be a little buggy. The measurements on the exported spec (that is, the web page) don't always match up 100% with the measurements you'll see in Sketch, but they're pretty close.
The Settings menu has several options.
Move to @Specs
Selecting "Move to @Specs" places any measurement layers in a special locked layer called "@Specs".
There isn't any documentation for the menu item, but it appears to simply make it impossible to accidentally move the existing measurements.
Clear Page Measure
Choosing "Clear Page Measure" deletes all of the measurement layers, even if they're in a @Specs folder.
Measurements before choosing "Clear Page Measure":
Choosing Reset Configs in Measure displays this popup:
Choose whatever resolution you want, usually depending on what kind of device you're designing for.
Be warned: this menu always shows the first option (Standard) selected, even if that's not what you originally chose.
Measure has a couple different ways to display measurements, but it's not clear what they are without experimenting.
The default theme is what you're already seen:
Choose "Toggle Theme" and nothing happens. Unfortunately, you have to remeasure everything in order to see the new theme.
That's the Sketch Measure plugin, inside and out. Good luck!