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.