New in Sketch: Stacks, frames and over 100 more improvements Learn more

Skip Navigation

Color Variables

Last updated on 27 May 2025
7 min read

With Color Variables, you can set colors and gradients that synchronize across your document. When you make changes to a Color Variable, those changes appear across all of the layers that use it. You can create Color Variables that are local to a specific document or share them in a Library to use across different documents.

  • Color Variables Color Variable can speed up your workflow and keep designs organized.
  • They synchronize across your document. When you change a Color Variable it will update any layer that uses it.
  • You can export Color Variables as Color Tokens or copy their individual values from the web app inspector.

Color Variables are also available in the web app Inspector, making them great for handoff.

Creating a Color Variable

You can create a new Color Variable from the Inspector, from the Components View or from Edit > Find and Replace Color menu.

Creating a Color Variable from the Inspector

Select any layer and click on the color well in the Inspector. Select the solid color Oval you want to use, then click on Create Color Variable. Give it a name and click on Create or press to save. You can also use the eyedropper tool Eyedropper tool to create Color Variables from your display, inside or outside of the Mac app.

Creating a Color Variable from the Components View

Switch to Components View Components View Tab, click on the Color Variables tab Color Variable in the toolbar and then click on Create. Pick the color you want using the Inspector and give your Color Variable a name. Press Enter or click anywhere in the Previews Grid to save.

Organizing Color Variables

Grouping Color Variables

To group your Color Variables, switch to Components View Components View Tab, go to the Color Variables tab, hold and choose the Color Variables you want to group. Control-click on your selection, and choose Group. Then, you can double-click on the title of the group Group in the left sidebar and rename it as you like. You can also drag Color Variables into existing groups in the left sidebar Group.

Like Symbols or Text Styles, you can also group Color Variables by using a / in their names. Anything before / will become the group name, and anything after will be the name of the Component within that group. For example, Primary/light and Primary/dark will become part of a group named Primary.

Organizing Color Variables in the Components View

Color Variables and groups will organize automatically in alphabetical order. You can use numbers in front of Color Variables so they appear in the order that works best for you. For example, 1 Primary or 2 Secondary. You can also add numbers to the end of similarly named variables, such as Neutral-100, Neutral-200.

Applying Color Variables

Applying a Color Variable from the Inspector

There are three ways to apply a Color Variable from the Inspector: use the color well, the Color Variable link icon, or color overrides in Symbol instances. In every case, start by selecting the layer where you want to apply the Color Variable.

  • Click the color well or a color override to open the color picker. You’ll see the list of Color Variables below it.
  • Click the Color Variable icon Add Library to open a popover with the list of available variables.

You can switch between Color Variables from your document or any enabled Library.

Note: When you use a Color Variable for the color of a text layer and then create a new text layer in the same document, your new text layer will also use that Color Variable.

Replacing a Color Variable from the Command Bar

Use the Command Bar to replace Color Variables in your selection. First, select a layer with a Color Variable applied. Then click the Color Variables icon Add Library in the Inspector, next to the color well, and choose the color you want. By default, you’ll see a popover to replace Color Variables. If you prefer to use the Command Bar instead, you can set it as the default in Settings > General.

You can replace a Color Variable for several layers at the same time. Just keep in mind that your new color will apply to all selected layers.

Applying a Color Variable from the Find and Replace menu

In the Find and Replace menu, click on the color well next to “Replace with”, and select the Color Variable you want to apply. Click anywhere to close the color picker, and hit Replace to update the colors.

Editing Color Variables

You can edit Color Variables from the Inspector, the Components View or Find and Replace menu.

You can Control-click on any Color Variable, and choose to copy its HEX, RGB, HSL, Objective-C or Swift code color values to the clipboard.

Editing Color Variables from the Inspector

Select any layer, and click on a color well in the Inspector. Click on Edit Variable and pick a new color. Choose Update to save. Keep in mind you can only edit Color Variables that are local to your document. If you want to edit Color Variables from a Library, you will have to edit them in their Library document.

Editing Color Variables from the Components View

Switch to the Components View Components View Tab and click on the Color Variables Color Variables tab. Click on the color swatch you want to edit and choose the new color using the Inspector. Changes will preview and save automatically.

Renaming a Color Variable

To rename a Color Variable, switch to the Components View and click on the Colors tab. Then, select the color swatch you want to rename. Under the Name section in the Inspector, type your new name. Your changes will save automatically. You can also Control-click on the color swatch and choose Rename.

Deleting a Color Variable

To delete a Color Variable, switch to the Components View, and click on the Colors Color Variables tab. Select the swatch of the Color Variable you want to delete and hit backspace. You can also Control-click on the color swatch and select Delete.

Detaching a Color Variable

You might want to make changes to the color of a single layer that uses a Color Variable without updating the Color Variable itself. In this case, you’ll want to detach that Color Variable first.

To detach a Color Variable from the Inspector, select the layer where you want to detach the Color Variable from, click on the color well in the Style menu in the Inspector, and click Detach Variable.

Find and replace a specific color or Color Variable

Choose Edit > Find and Replace Color to bring up the Find and Replace Color menu. From there, select the color or Color Variable you want to find within your design and the color or Color Variable you want to replace it with.

An image showing the Find and Replace Color sheet in Sketch

Enable “Include all opacities of this color” to find all colors with different alphas, but the same RGB or HEX values.

Enable “Preserve original opacity” to keep those different alphas intact when you replace the color.

Note: We built a plugin to help you migrate to Color Variables. They’ve been around for a while, but this plugin makes it easier to apply them consistently across your documents. It automatically assigns Color Variables to any layers, Text Styles, or Layer Styles using the same color — even if they weren’t using a Color Variable before.

Using Color Variables in developer handoff

Color Variables are great for keeping colors consistent between design and code projects. You can download Color Variables as Color Tokens, as CSS variables or in JSON format, or even generate a URL that dynamically updates with the latest values. You can also copy values for individual Color Variables from the web app Inspector.

1440x718