Color Picker
Color pickers let users choose colors (optionally with transparency) from a toggle or label reference.
Playground
This is a toggle
Values must be between 0 and 1.
Allow transparency selection
Usage
You can create a Color Picker by calling the AddColorPicker
method on a toggle or label reference.
Arguments
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Index/ID of the color picker | string | nil |
2 | Color picker configuration table | table | nil |
Configuration Table
Prop
Type
Methods
You can use the following methods to interact with the color picker:
SetValue
Sets the color using HSV components.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | HSV table (e.g. {H = 0, S = 1, V = 1} ) | table | nil |
2 | Transparency between 0 and 1 | number | nil |
SetValueRGB
Sets the color using an RGB Color3
value.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | RGB color (Color3 ) | Color3 | nil |
2 | Transparency between 0 and 1 | number | nil |
OnChanged
Registers an additional change callback.
Arg Idx | Argument Description | Type | Default |
---|---|---|---|
1 | Callback executed when the color changes | function | nil |
Example
Color pickers can also be attached to labels via AddLabel(...):AddColorPicker(...)
for static UI configuration.