[MIRROR] Fix skin tone sorting and refactor color procs [MDB IGNORE] (#10210)

* Fix skin tone sorting and refactor color procs (#63554)

* Remove superfluous hash from hex2rgb call
Add stack_trace to hex2rgb to catch future nonsense

* Fix skin tone sorting and refactor color procs

Co-authored-by: AndrewL97 <andrewjlove97@gmail.com>
This commit is contained in:
SkyratBot
2021-12-23 16:46:08 +00:00
committed by GitHub
co-authored by AndrewL97
parent 3f6265f824
commit a0c805ff4c
6 changed files with 8 additions and 135 deletions
+1 -2
View File
@@ -14,8 +14,7 @@
var/list/to_hex = list()
for (var/choice in get_choices())
var/hex_value = skintone2hex(choice)
var/list/rgb = hex2rgb("#[hex_value]")
var/list/hsl = rgb2hsl(rgb[1], rgb[2], rgb[3])
var/list/hsl = rgb2num(hex_value, COLORSPACE_HSL)
to_hex[choice] = list(
"lightness" = hsl[3],