Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ColorField

Makes a field for selecting a color. For more information, refer to UXML element ColorField.
Read time 8 minutesLast updated 11 days ago

Definition

[Icon("UIToolkit/Icons/ColorField.png")]public class ColorField : BaseField<Color>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, INotifyValueChanged<Color>, IMixedValueSupport

Static Fields

Value

Description

colorContainerUssClassNameUSS class name of color container elements in elements of this type.
colorUssClassNameUSS class name of color elements in elements of this type.
eyeDropperUssClassNameUSS class name of eyedropper elements in elements of this type.
gradientContainerUssClassNameUSS class name of gradient container elements in elements of this type.
hdrLabelUssClassNameUSS class name of hdr label elements in elements of this type.
inputUssClassNameUSS class name of input elements in elements of this type.
labelUssClassNameUSS class name of labels in elements of this type.
mixedValueColorUssClassNameUSS class name of color elements in elements of this type when showing mixed values.
ussClassNameUSS class name of elements of this type.

Constructors

Constructor

Description

ColorField()Initializes and returns an instance of ColorField.
ColorField(System.String)Initializes and returns an instance of ColorField.

Properties

Property

Description

hdrIf true, treats the color as an HDR value. If false, treats the color as a standard LDR value.
showAlphaIf true, allows the user to set an alpha value for the color. If false, hides the alpha component.
showEyeDropperIf true, the color picker will show the eyedropper control. If false, the color picker won't show the eyedropper control.

Inheritance

Inherited Members