Class ColorPicker
ColorPicker UI Element.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class ColorPicker : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, INotifyValueChanged<Color>
Constructors
ColorPicker()
Default constructor.
Declaration
public ColorPicker()
Fields
alphaSliderUssClassName
The Alpha slider styling class.
Declaration
public const string alphaSliderUssClassName = "appui-colorpicker__alphaslider"
Field Value
Type | Description |
---|---|
string |
blueChannelSliderUssClassName
The RGB blue slider styling class.
Declaration
public const string blueChannelSliderUssClassName = "appui-colorpicker__blue-channel-slider"
Field Value
Type | Description |
---|---|
string |
brightnessSliderUssClassName
The brightness slider styling class.
Declaration
public const string brightnessSliderUssClassName = "appui-colorpicker__brightness-slider"
Field Value
Type | Description |
---|---|
string |
channelsContainerUssClassName
The Channels container styling class.
Declaration
public const string channelsContainerUssClassName = "appui-colorpicker__channels-container"
Field Value
Type | Description |
---|---|
string |
channelsDropdownUssClassName
The channels dropdown styling class.
Declaration
public const string channelsDropdownUssClassName = "appui-colorpicker__channels-dropdown"
Field Value
Type | Description |
---|---|
string |
greenChannelSliderUssClassName
The RGB green slider styling class.
Declaration
public const string greenChannelSliderUssClassName = "appui-colorpicker__green-channel-slider"
Field Value
Type | Description |
---|---|
string |
hdrUssClassName
The HDR styling class.
Declaration
public const string hdrUssClassName = "appui-colorpicker--hdr"
Field Value
Type | Description |
---|---|
string |
hexFieldUssClassName
The hex field styling class.
Declaration
public const string hexFieldUssClassName = "appui-colorpicker__hex-field"
Field Value
Type | Description |
---|---|
string |
hueSliderUssClassName
The hue slider styling class.
Declaration
public const string hueSliderUssClassName = "appui-colorpicker__hue-slider"
Field Value
Type | Description |
---|---|
string |
redChannelSliderUssClassName
The RGB red slider styling class.
Declaration
public const string redChannelSliderUssClassName = "appui-colorpicker__red-channel-slider"
Field Value
Type | Description |
---|---|
string |
saturationSliderUssClassName
The saturation slider styling class.
Declaration
public const string saturationSliderUssClassName = "appui-colorpicker__saturation-slider"
Field Value
Type | Description |
---|---|
string |
svSquareUssClassName
The SV square styling class.
Declaration
public const string svSquareUssClassName = "appui-colorpicker__svsquare"
Field Value
Type | Description |
---|---|
string |
toolbarUssClassName
The ColorPicker toolbar styling class.
Declaration
public const string toolbarUssClassName = "appui-colorpicker__colortoolbar"
Field Value
Type | Description |
---|---|
string |
ussClassName
The ColorPicker main styling class.
Declaration
public const string ussClassName = "appui-colorpicker"
Field Value
Type | Description |
---|---|
string |
wheelContainerUssClassName
The WheelContainer styling class.
Declaration
public const string wheelContainerUssClassName = "appui-colorpicker__wheelcontainer"
Field Value
Type | Description |
---|---|
string |
wheelUssClassName
The ColorWheel styling class.
Declaration
public const string wheelUssClassName = "appui-colorpicker__wheel"
Field Value
Type | Description |
---|---|
string |
Properties
contentContainer
The content container of the ColorPicker. This is null as the ColorPicker does not have a content container.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
hdr
Determines if the ColorPicker should display colors in HDR.
Declaration
public bool hdr { get; set; }
Property Value
Type | Description |
---|---|
bool |
previousValue
The previous color value. This color will be displayed in the toolbar.
Declaration
public Color previousValue { get; set; }
Property Value
Type | Description |
---|---|
Color |
showAlpha
Determines if the ColorPicker should display the alpha slider.
Declaration
public bool showAlpha { get; set; }
Property Value
Type | Description |
---|---|
bool |
showHex
Determines if the ColorPicker should display the hex field.
Declaration
public bool showHex { get; set; }
Property Value
Type | Description |
---|---|
bool |
showToolbar
Determines if the ColorPicker should display the toolbar.
Declaration
public bool showToolbar { get; set; }
Property Value
Type | Description |
---|---|
bool |
value
The current color value.
Declaration
public Color value { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
SetValueWithoutNotify(Color)
Sets the value without notifying the value changed callback.
Declaration
public void SetValueWithoutNotify(Color newValue)
Parameters
Type | Name | Description |
---|---|---|
Color | newValue | The new color value. |