Class ColorWheel
A color wheel that allows the user to select a color hue by rotating the wheel. It is also possible to set the saturation and brightness and opacity of the wheel.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class ColorWheel : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<float>, IValidatableElement<float>, INotifyValueChanging<float>, INotifyValueChanged<float>
Constructors
ColorWheel()
Default constructor.
Declaration
public ColorWheel()
Fields
imageUssClassName
The ColorWheel image styling class.
Declaration
public static readonly string imageUssClassName
Field Value
Type | Description |
---|---|
string |
thumbSwatchUssClassName
The ColorWheel thumb swatch styling class.
Declaration
public static readonly string thumbSwatchUssClassName
Field Value
Type | Description |
---|---|
string |
thumbUssClassName
The ColorWheel thumb styling class.
Declaration
public static readonly string thumbUssClassName
Field Value
Type | Description |
---|---|
string |
ussClassName
The ColorWheel main styling class.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
string |
Properties
brightness
The brightness of the color wheel.
Declaration
public float brightness { get; set; }
Property Value
Type | Description |
---|---|
float |
checkerColor1
The first color of the checkerboard pattern.
Declaration
public Color checkerColor1 { get; set; }
Property Value
Type | Description |
---|---|
Color |
checkerColor2
The second color of the checkerboard pattern.
Declaration
public Color checkerColor2 { get; set; }
Property Value
Type | Description |
---|---|
Color |
checkerSize
The size of the checkerboard pattern.
Declaration
public int checkerSize { get; set; }
Property Value
Type | Description |
---|---|
int |
incrementFactor
The factor by which the value is incremented when interacting with the wheel from the keyboard.
Declaration
public float incrementFactor { get; set; }
Property Value
Type | Description |
---|---|
float |
innerRadius
The inner radius of the color wheel.
Declaration
public float innerRadius { get; set; }
Property Value
Type | Description |
---|---|
float |
invalid
The ColorWheel invalid state.
Declaration
public bool invalid { get; set; }
Property Value
Type | Description |
---|---|
bool |
opacity
The opacity of the color wheel. Note that a checkerboard pattern is always drawn behind the color wheel.
Declaration
public float opacity { get; set; }
Property Value
Type | Description |
---|---|
float |
saturation
The saturation of the color wheel.
Declaration
public float saturation { get; set; }
Property Value
Type | Description |
---|---|
float |
selectedColor
The currently selected color.
Declaration
public Color selectedColor { get; }
Property Value
Type | Description |
---|---|
Color |
validateValue
The ColorWheel validation function.
Declaration
public Func<float, bool> validateValue { get; set; }
Property Value
Type | Description |
---|---|
Func<float, bool> |
value
The hue value of the color wheel.
Declaration
public float value { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
SetValueWithoutNotify(float)
Sets the value without sending any event.
Declaration
public void SetValueWithoutNotify(float newValue)
Parameters
Type | Name | Description |
---|---|---|
float | newValue | The new value to set. |