docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ColorPicker

    ColorPicker UI Element.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    ColorPicker
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    INotifyValueChanged<Color>
    Inherited Members
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public class ColorPicker : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, INotifyValueChanged<Color>

    Constructors

    ColorPicker()

    Default constructor.

    Declaration
    public ColorPicker()

    Fields

    alphaSliderUssClassName

    The Alpha slider styling class.

    Declaration
    public const string alphaSliderUssClassName = "appui-colorpicker__alphaslider"
    Field Value
    Type Description
    string

    blueChannelSliderUssClassName

    The RGB blue slider styling class.

    Declaration
    public const string blueChannelSliderUssClassName = "appui-colorpicker__blue-channel-slider"
    Field Value
    Type Description
    string

    brightnessSliderUssClassName

    The brightness slider styling class.

    Declaration
    public const string brightnessSliderUssClassName = "appui-colorpicker__brightness-slider"
    Field Value
    Type Description
    string

    channelsContainerUssClassName

    The Channels container styling class.

    Declaration
    public const string channelsContainerUssClassName = "appui-colorpicker__channels-container"
    Field Value
    Type Description
    string

    channelsDropdownUssClassName

    The channels dropdown styling class.

    Declaration
    public const string channelsDropdownUssClassName = "appui-colorpicker__channels-dropdown"
    Field Value
    Type Description
    string

    greenChannelSliderUssClassName

    The RGB green slider styling class.

    Declaration
    public const string greenChannelSliderUssClassName = "appui-colorpicker__green-channel-slider"
    Field Value
    Type Description
    string

    hexFieldUssClassName

    The hex field styling class.

    Declaration
    public const string hexFieldUssClassName = "appui-colorpicker__hex-field"
    Field Value
    Type Description
    string

    hueSliderUssClassName

    The hue slider styling class.

    Declaration
    public const string hueSliderUssClassName = "appui-colorpicker__hue-slider"
    Field Value
    Type Description
    string

    redChannelSliderUssClassName

    The RGB red slider styling class.

    Declaration
    public const string redChannelSliderUssClassName = "appui-colorpicker__red-channel-slider"
    Field Value
    Type Description
    string

    saturationSliderUssClassName

    The saturation slider styling class.

    Declaration
    public const string saturationSliderUssClassName = "appui-colorpicker__saturation-slider"
    Field Value
    Type Description
    string

    svSquareUssClassName

    The SV square styling class.

    Declaration
    public const string svSquareUssClassName = "appui-colorpicker__svsquare"
    Field Value
    Type Description
    string

    toolbarUssClassName

    The ColorPicker toolbar styling class.

    Declaration
    public const string toolbarUssClassName = "appui-colorpicker__colortoolbar"
    Field Value
    Type Description
    string

    ussClassName

    The ColorPicker main styling class.

    Declaration
    public const string ussClassName = "appui-colorpicker"
    Field Value
    Type Description
    string

    wheelContainerUssClassName

    The WheelContainer styling class.

    Declaration
    public const string wheelContainerUssClassName = "appui-colorpicker__wheelcontainer"
    Field Value
    Type Description
    string

    wheelUssClassName

    The ColorWheel styling class.

    Declaration
    public const string wheelUssClassName = "appui-colorpicker__wheel"
    Field Value
    Type Description
    string

    Properties

    contentContainer

    The content container of the ColorPicker. This is null as the ColorPicker does not have a content container.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    previousValue

    The previous color value. This color will be displayed in the toolbar.

    Declaration
    public Color previousValue { get; set; }
    Property Value
    Type Description
    Color

    showAlpha

    Determines if the ColorPicker should display the alpha slider.

    Declaration
    public bool showAlpha { get; set; }
    Property Value
    Type Description
    bool

    showHex

    Determines if the ColorPicker should display the hex field.

    Declaration
    public bool showHex { get; set; }
    Property Value
    Type Description
    bool

    showToolbar

    Determines if the ColorPicker should display the toolbar.

    Declaration
    public bool showToolbar { get; set; }
    Property Value
    Type Description
    bool

    value

    The current color value.

    Declaration
    public Color value { get; set; }
    Property Value
    Type Description
    Color

    Methods

    SetValueWithoutNotify(Color)

    Sets the value without notifying the value changed callback.

    Declaration
    public void SetValueWithoutNotify(Color newValue)
    Parameters
    Type Name Description
    Color newValue

    The new color value.

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    INotifyValueChanged<T>

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)