-
-
Notifications
You must be signed in to change notification settings - Fork 26
ColorPicker
coding.jackalope edited this page Jan 20, 2021
·
2 revisions
The color picker displays a window that allows the user to select a color on the spectrum. The window displays the saturation of the current hue, a hue picker, and an alpha picker. There are also input fields for each channel in RGBA in the 0 - 255 range. The API, however, takes in and returns color in the normalized 0 - 1 range.
Slab.ColorPicker({Color = {1.0, 0.0, 0.0, 1.0}})
Below is a list of functions associated with the color picker API.
Displays the color picker window.
Parameter | Type | Description |
---|---|---|
Options | Table | List of options for how the color picker will behave. |
Option | Type | Description |
---|---|---|
Color | Table | The color to modify. This should be in the format of 0-1 for each color component (RGBA). |
Return | Description |
---|---|
Table | Returns the button and color the user has selected. |
Name | Type | Description |
---|---|---|
Button | Number | The button the user clicked. 1 - OK. 0 - No Interaction. -1 - Cancel. |
Color | Table | The new color the user has chosen. This will always be returned. |