Adds tgui color picker (#94313)

## About The Pull Request

Ports https://github.com/Monkestation/Monkestation2.0/pull/1231 which is
a port of https://github.com/BeeStation/BeeStation-Hornet/pull/9417
which is a port of https://github.com/omgovich/react-colorful/
Also a port of
https://github.com/effigy-se/effigy/blob/main/tgui/packages/tgui/interfaces/effigy/ColorPickerModal.tsx
for hex color presets

Admin stuff got excluded (pref-like picker, filterrific, get-variables)



https://github.com/user-attachments/assets/7069bef9-81cd-4636-bf68-cbad227ef09e


## Why It's Good For The Game

It's one of the only input areas that still doesn't use TGUI, leaving
darkmode players flashbanged every single time a color selection UI is
opened. This is also just visually great and I think a big upgrade from
byond's.

## Changelog

🆑 omgovich, itsmeow, Absolucy, JohnFulpWillard, jlsnow301, TealSeer,
lessthnthree
add: Color selection panels now use TGUI (If you have TGUI enabled in
settings).
/🆑
This commit is contained in:
John Willard
2025-12-21 16:18:34 -08:00
committed by GitHub
parent cfe80bb97d
commit 41f34c2a86
39 changed files with 1329 additions and 40 deletions
+2 -2
View File
@@ -256,12 +256,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/default_value = read_preference(requested_preference.type)
// Yielding
var/new_color = input(
var/new_color = tgui_color_picker(
usr,
"Select new color",
null,
default_value || COLOR_WHITE,
) as color | null
)
if (!new_color)
return FALSE
+1 -1
View File
@@ -141,7 +141,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
return
ADMIN_VERB(set_ooc_color, R_FUN, "Set Player OOC Color", "Modifies the global OOC color.", ADMIN_CATEGORY_SERVER)
var/newColor = input(user, "Please select the new player OOC color.", "OOC color") as color|null
var/newColor = tgui_color_picker(user, "Please select the new player OOC color.", "OOC color")
if(isnull(newColor))
return
var/new_color = sanitize_color(newColor)