Class ColorPicker
Inheritance
Inherited Members
Namespace: NoXP.RuntimeComponents.ColorPicker
Assembly: NoXP.RuntimeComponents.dll
Syntax
public class ColorPicker : UIWindow
Fields
InvariantCulture
Declaration
public static readonly CultureInfo InvariantCulture
Field Value
| Type | Description |
|---|---|
| System.Globalization.CultureInfo |
Properties
ChannelModule
Declaration
protected ChannelModule ChannelModule { get; }
Property Value
| Type | Description |
|---|---|
| ChannelModule |
ColorValue
Declaration
protected ColorValueModule ColorValue { get; }
Property Value
| Type | Description |
|---|---|
| ColorValueModule |
Colorwheel
Declaration
protected ColorwheelModule Colorwheel { get; }
Property Value
| Type | Description |
|---|---|
| ColorwheelModule |
CurrentMode
gets the mode the ColorPicker instance is currently operating in
Declaration
public ColorPickerModes CurrentMode { get; protected set; }
Property Value
| Type | Description |
|---|---|
| ColorPickerModes |
HexadecimalModule
Declaration
protected HexadecimalModule HexadecimalModule { get; }
Property Value
| Type | Description |
|---|---|
| HexadecimalModule |
IsEyedropperAvailable
gets or sets the eyedropper feature's availability. Use this to en-/disable th eyedropper feature
Declaration
public bool IsEyedropperAvailable { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Mode
Declaration
protected ModeModule Mode { get; }
Property Value
| Type | Description |
|---|---|
| ModeModule |
SwatchModule
Declaration
protected SwatchModule SwatchModule { get; }
Property Value
| Type | Description |
|---|---|
| SwatchModule |
Value
gets or sets the current color of the ColorPicker instance in RGBA format
Declaration
public Color Value { get; set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Color |
ValueHSV
gets or sets the current color of the ColorPicker instance in HSVA format (as Vector4)
Declaration
public Vector4 ValueHSV { get; set; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Vector4 |
ValueReset
gets or sets the reset color value used by the ColorPicker instance
Declaration
public Color ValueReset { get; }
Property Value
| Type | Description |
|---|---|
| UnityEngine.Color |
Methods
ApplyColorSchema(IColorSchema)
applies the given color schema to the color picker and its modules
Declaration
public override void ApplyColorSchema(IColorSchema schema)
Parameters
| Type | Name | Description |
|---|---|---|
| IColorSchema | schema |
Overrides
Configure(ColorPickerConfig)
Declaration
public void Configure(ColorPickerConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPickerConfig | config |
Init()
Declaration
protected override void Init()
Overrides
LoadSwatches(ICollection<Swatch>)
loads the System.Collections.Generic.ICollection<T> into the color picker
Declaration
public void LoadSwatches(ICollection<Swatch> swatches)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.ICollection<Swatch> | swatches |
Open(Color)
displays the ColorPicker instance and using given color, specified mode and modules flag
Declaration
public void Open(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Color | color | The color used to setup the ColorPicker instance before it is displayed |
Open(Color, ColorPickerModes, ColorPickerModules)
displays the ColorPicker instance and sets it's color values to the given color using the specified mode and modules
Declaration
public void Open(Color color, ColorPickerModes mode, ColorPickerModules modules = ColorPickerModules.All)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Color | color | The color used to setup the ColorPicker instance before it is displayed |
| ColorPickerModes | mode | The color mode the color picker should display at first |
| ColorPickerModules | modules | The modules the color picker should display. |
Open(Color, Color, ColorPickerModes, ColorPickerModules)
displays the ColorPicker instance and using given color, specified mode and modules flag
Declaration
public void Open(Color color, Color resetColor, ColorPickerModes mode, ColorPickerModules modules = ColorPickerModules.All)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityEngine.Color | color | The color used to setup the ColorPicker instance before it is displayed |
| UnityEngine.Color | resetColor | The reset color used to setup the ColorPicker instance before it is displayed |
| ColorPickerModes | mode | The color mode the color picker should display at first |
| ColorPickerModules | modules | The modules the color picker should display. |
RefreshValueFromHSV(ColorPickerElementMasks)
Declaration
protected void RefreshValueFromHSV(ColorPickerElementMasks mask = ColorPickerElementMasks.Everything)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPickerElementMasks | mask |
RefreshValueFromRGB(ColorPickerElementMasks)
Declaration
protected void RefreshValueFromRGB(ColorPickerElementMasks mask = ColorPickerElementMasks.Everything)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPickerElementMasks | mask |
ResetColor()
resets the current color of the color picker to the value it was started with
Declaration
public void ResetColor()
SetDisplayedModules(Int32)
Sets the Color Picker displayed module mask to show/hide the given modules
Declaration
public override void SetDisplayedModules(int displayedModules)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | displayedModules | The module bitmask used to set the ColorPicker's modules active (or inactive). |
Overrides
Remarks
See ColorPickerModules for the available ColorPicker's module masks.
SetMode(ColorPickerModes)
sets the color picker mode to the given type. See ColorPickerModes for available modes.
Declaration
public void SetMode(ColorPickerModes mode)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPickerModes | mode | the mode to be set |
SetMode(Int32)
sets the color picker mode to the given type. See ColorPickerModes for available modes.
Declaration
public void SetMode(int selectedIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | selectedIndex | the mode to be set, in integer representation |
SetOrientation(ColorPickerOrientation)
set the color picker orientation to the given type: See ColorPickerOrientation for available orientations.
Declaration
public void SetOrientation(ColorPickerOrientation orientation)
Parameters
| Type | Name | Description |
|---|---|---|
| ColorPickerOrientation | orientation | the orientation to be set |
Events
ValueChangeEnded
Declaration
public event Action<Color> ValueChangeEnded
Event Type
| Type | Description |
|---|---|
| System.Action<UnityEngine.Color> |
ValueHSVChangeEnded
Declaration
public event Action<Color> ValueHSVChangeEnded
Event Type
| Type | Description |
|---|---|
| System.Action<UnityEngine.Color> |