Show / Hide Table of Contents

Class ColorPicker

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
UnityEngine.EventSystems.UIBehaviour
UIComponent
UIWindow
ColorPicker
Inherited Members
UIWindow.DisplayedMaskMinimized
UIWindow.DisplayedMaskNormal
UIWindow.IsMovable
UIWindow.ToTopOnFocus
UIWindow.ControlBox
UIWindow.Icon
UIWindow.Text
UIWindow.Title
UIWindow.Background
UIWindow.ToggleMimizedState()
UIComponent.Closed
UIComponent.Opened
UIComponent._isInitialized
UIComponent._maskedModules
UIComponent.Pivot
UIComponent.AnchoredPosition
UIComponent.RectTransform
UIComponent.Content
UIComponent.Awake()
UIComponent.Open()
UIComponent.Close()
UIComponent.Toggle()
UIComponent.SetActiveModules(Int32)
UIComponent.RefreshDisplayedModules()
UIComponent.SetPivot(Vector2, Boolean)
UIComponent.Minimize()
UIComponent.Maximize()
UIComponent.RestoreState()
UIComponent.OnOpened()
UIComponent.OnClosed()
UIComponent.HasFlag(Int32, Int32)
UnityEngine.EventSystems.UIBehaviour.OnEnable()
UnityEngine.EventSystems.UIBehaviour.Start()
UnityEngine.EventSystems.UIBehaviour.OnDisable()
UnityEngine.EventSystems.UIBehaviour.OnDestroy()
UnityEngine.EventSystems.UIBehaviour.IsActive()
UnityEngine.EventSystems.UIBehaviour.OnValidate()
UnityEngine.EventSystems.UIBehaviour.Reset()
UnityEngine.EventSystems.UIBehaviour.OnRectTransformDimensionsChange()
UnityEngine.EventSystems.UIBehaviour.OnBeforeTransformParentChanged()
UnityEngine.EventSystems.UIBehaviour.OnTransformParentChanged()
UnityEngine.EventSystems.UIBehaviour.OnDidApplyAnimationProperties()
UnityEngine.EventSystems.UIBehaviour.OnCanvasGroupChanged()
UnityEngine.EventSystems.UIBehaviour.OnCanvasHierarchyChanged()
UnityEngine.EventSystems.UIBehaviour.IsDestroyed()
UnityEngine.MonoBehaviour.IsInvoking()
UnityEngine.MonoBehaviour.CancelInvoke()
UnityEngine.MonoBehaviour.Invoke(System.String, System.Single)
UnityEngine.MonoBehaviour.InvokeRepeating(System.String, System.Single, System.Single)
UnityEngine.MonoBehaviour.CancelInvoke(System.String)
UnityEngine.MonoBehaviour.IsInvoking(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String)
UnityEngine.MonoBehaviour.StartCoroutine(System.String, System.Object)
UnityEngine.MonoBehaviour.StartCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StartCoroutine_Auto(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(System.Collections.IEnumerator)
UnityEngine.MonoBehaviour.StopCoroutine(UnityEngine.Coroutine)
UnityEngine.MonoBehaviour.StopCoroutine(System.String)
UnityEngine.MonoBehaviour.StopAllCoroutines()
UnityEngine.MonoBehaviour.print(System.Object)
UnityEngine.MonoBehaviour.useGUILayout
UnityEngine.MonoBehaviour.runInEditMode
UnityEngine.Behaviour.enabled
UnityEngine.Behaviour.isActiveAndEnabled
UnityEngine.Component.GetComponent(System.Type)
UnityEngine.Component.GetComponent<T>()
UnityEngine.Component.TryGetComponent(System.Type, UnityEngine.Component)
UnityEngine.Component.TryGetComponent<T>(T)
UnityEngine.Component.GetComponent(System.String)
UnityEngine.Component.GetComponentInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentInChildren(System.Type)
UnityEngine.Component.GetComponentInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentInChildren<T>()
UnityEngine.Component.GetComponentsInChildren(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInChildren(System.Type)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean)
UnityEngine.Component.GetComponentsInChildren<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInChildren<T>()
UnityEngine.Component.GetComponentsInChildren<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentInParent(System.Type)
UnityEngine.Component.GetComponentInParent<T>()
UnityEngine.Component.GetComponentsInParent(System.Type, System.Boolean)
UnityEngine.Component.GetComponentsInParent(System.Type)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean)
UnityEngine.Component.GetComponentsInParent<T>(System.Boolean, System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponentsInParent<T>()
UnityEngine.Component.GetComponents(System.Type)
UnityEngine.Component.GetComponents(System.Type, System.Collections.Generic.List<UnityEngine.Component>)
UnityEngine.Component.GetComponents<T>(System.Collections.Generic.List<T>)
UnityEngine.Component.GetComponents<T>()
UnityEngine.Component.CompareTag(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessageUpwards(System.String, System.Object)
UnityEngine.Component.SendMessageUpwards(System.String)
UnityEngine.Component.SendMessageUpwards(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, System.Object)
UnityEngine.Component.SendMessage(System.String)
UnityEngine.Component.SendMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.SendMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object, UnityEngine.SendMessageOptions)
UnityEngine.Component.BroadcastMessage(System.String, System.Object)
UnityEngine.Component.BroadcastMessage(System.String)
UnityEngine.Component.BroadcastMessage(System.String, UnityEngine.SendMessageOptions)
UnityEngine.Component.transform
UnityEngine.Component.gameObject
UnityEngine.Component.tag
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(System.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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
UIWindow.ApplyColorSchema(IColorSchema)

Configure(ColorPickerConfig)

Declaration
public void Configure(ColorPickerConfig config)
Parameters
Type Name Description
ColorPickerConfig config

Init()

Declaration
protected override void Init()
Overrides
UIWindow.Init()

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
UIWindow.SetDisplayedModules(Int32)
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>
In This Article
Back to top Generated by DocFX