Class ColorField
Makes a field for selecting a color.
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public class ColorField : BaseField<Color>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<Color>, IMixedValueSupport
Constructors
ColorField()
Initializes and returns an instance of ColorField.
Declaration
public ColorField()
ColorField(String)
Initializes and returns an instance of ColorField.
Declaration
public ColorField(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The text to use as a label. |
Fields
inputUssClassName
USS class name of input elements in elements of this type.
Declaration
public static readonly string inputUssClassName
Field Value
Type | Description |
---|---|
String |
labelUssClassName
USS class name of labels in elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Properties
hdr
If true, treats the color as an HDR value. If false, treats the color as a standard LDR value.
Declaration
public bool hdr { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
showAlpha
If true, allows the user to set an alpha value for the color. If false, hides the alpha component.
Declaration
public bool showAlpha { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
showEyeDropper
If true, the color picker will show the eyedropper control. If false, the color picker won't show the eyedropper control.
Declaration
public bool showEyeDropper { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
UpdateMixedValueContent()
Declaration
protected override void UpdateMixedValueContent()
Overrides
UnityEngine.UIElements.BaseField<Color>.UpdateMixedValueContent()