-
Notifications
You must be signed in to change notification settings - Fork 0
ColorPicker
donniedice edited this page May 1, 2026
·
4 revisions
The ColorPicker module (RGXColorPicker) is a custom rectangular HSV color picker introduced in v2.0.0, replacing WoW's default circular picker with a Figma-style interface.
- Rectangular SV (Saturation-Value) box — drag to select saturation and brightness
- Hue bar — vertical slider for hue selection
- RGB inputs — numeric fields for precise RGB values
- HEX input — text field for hex color entry
- 4 palettes — Recent, Class, Quality, Basic color swatches
- History — recent colors are saved and displayed
- Alpha support — opacity slider
Show the color picker with an initial color:
RGX:GetColorPicker():Show(0.5, 0.2, 0.8, 1.0, function(r, g, b, a)
print(string.format("Selected: %.2f, %.2f, %.2f, %.2f", r, g, b, a))
end)Hide the color picker programmatically.
Get the current color values:
local r, g, b, a = RGX:GetColorPicker():Get()Set the color programmatically. Updates all UI elements:
RGX:GetColorPicker():Set(1.0, 0.0, 0.0, 1.0)Register a callback for when the picker is closed:
RGX:GetColorPicker():OnClose(function(r, g, b, a)
print("Final color:", r, g, b, a)
end)| Tab | Contents |
|---|---|
| Recent | Last 16 colors selected |
| Class | All 13 class colors |
| Quality | Item quality colors (Poor through Heirloom) |
| Basic | Named palette colors (red, blue, green, etc.) |
Clicking a swatch sets the picker to that color immediately.
| Key | Action |
|---|---|
| Escape | Close the picker |
| Enter | Confirm and close |
| Tab | Cycle between input fields |
The Colors module's OpenPicker and CreateColorPicker methods delegate to the ColorPicker module internally. You rarely need to interact with RGXColorPicker directly — use RGXColors as the primary interface.
-- Recommended: use Colors module
RGX:GetColors():OpenPicker(r, g, b, callback)
-- Direct access (also works)
RGX:GetColorPicker():Show(r, g, b, a, callback)