The InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary window displays color properties as swatches. The swatch:
The Unity Editor opens the type of Color window that matches the property you’re editing. The window can be one of three types:
To select a color, use the color wheel, the sliders or text fields, or the eyedropper tool.
The color wheel represents the full color spectrum. To select a color, click anywhere on the circle.
The square at the center of the circle is a zoomed-in view of the color wheel. Use it to fine-tune the color you selected in the wheel.
To set the transparency (the Alpha value), use the A slider.
The sliders and entry fields in the color picker window let you enter color values in different formats:
0-255
0-1.0
All three options have an alpha (A) slider for transparency.
You can enter exact values in the fields, or use the sliders to change the values.
Use the Hexadecimal field to enter a color value in hexadecimal format.
To use an existing color, sample it with the eyedropper tool:
Tip: The eyedropper is also available in the Inspector window, so you can use it without opening the Color window.
The Color window has two swatches. One shows the color before you edited it, and the other shows the current selection.
To reset your selection to the original color, click the original color swatch.
You can save your color swatch selections as presets, and organize them into libraries.
In the Swatches section, the last swatch in the list is a representation of your current edit. To save the color as a preset:
To delete a preset, right-click it and select Delete.
To replace a preset, right-click it and select Replace. This saves your current color selection to the preset.
To rearrange the swatches, drag them to a new position in the list.
You can save your swatch presets to one or more libraries, and move between your library and the default library. Use the More (⋮) menu to create and move between libraries.
A gradient moves from one color to another over time or space. The transition can be gradual, with the colors blending into each other, or as steps between color blocks.
The Gradient Editor is available only for properties that set up to use gradients rather than single colors. For example:
You can’t change a single color property to a gradient property in the Inspector window, but you can use a script to override the property. For more information, refer to Gradient class.
To open the Gradient Editor, click the color swatch in the Inspector window.
The Gradient Editor controls both the colors and transparency of the gradient. The gradient bar shows the colors and how they blend, as determined by the interpolation mode. The color stops are upward-pointing markers, and the transparency stops are downward-pointing markers.
Every gradient has both color and transparency settings. With these settings, you can create four types of gradients:
A gradient has two color stops by default, but you can:
The color stops are upward-pointing markers along the bottom of the gradient bar. Click a stop to select it, or click under the bar to add a stop, and then:
Color interpolation happens only between the stops. To start or end a gradient with a solid color, move the first or last stop away from the gradient’s edge.
Tip: You can undo changes one by one, or you can save your start gradient as a preset before editing it.
The transparency stops are downward-pointing markers along the top of the gradient bar. The stop’s color ranges from white to black to indicate the level of transparency.
The default gradient has two transparency stops set to 100% alpha, making the gradient fully opaque. You can:
You can edit and add transparency stops the same way you edit and add color stops. When you select a transparency stop, the color swatch changes to a transparency slider.
Transparency in the fixed mode isn’t interpolated between stops. It forms a block of fixed transparency to the left of each stop, and isn’t applied to the right of that stop. However, the transparency blocks don’t have to align with the color blocks within the gradient. You can change the transparency multiple times within a color block, or use a single transparency across multiple color blocks.
A gradient can use one of three color interpolation modes:
The images show the three color modes. Note that the gradient in the classic mode has sharper transitions between colors than the perceptual mode.
Presets save both the color values and the transparency values you’re using. Any preset you save is available in the Gradient Editor for any gradient property in your project.
The Presets section previews the gradient as the next preset on the list, and it changes as you edit. To save a preset from your current edit, click New on the preview preset.
To use a preset, click it. Any changes you make then create a new preset that you can save. To save your changes to the original preset, right-click the preset and select Replace.
Tip: You can create a preset from the default gradient, so you can always return to it.
You can save your presets to one or more libraries, and move between your library and the default library. Use the More (⋮) menu to create and move between libraries.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.