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

* Remove superfluous hash from hex2rgb call
Add stack_trace to hex2rgb to catch future nonsense
This commit is contained in:
AndrewL97
2021-12-22 21:07:53 -08:00
committed by GitHub
parent 8ec8bfb97f
commit 619acc1624
6 changed files with 8 additions and 135 deletions
@@ -20,7 +20,7 @@
var/datum/port/input/on
var/max_power = 5
var/min_lightness = 0.4
var/min_lightness = 40
var/shell_light_color
/obj/item/circuit_component/light/get_ui_notices()
@@ -48,9 +48,8 @@
red.set_value(clamp(red.value, 0, 255))
blue.set_value(clamp(blue.value, 0, 255))
green.set_value(clamp(green.value, 0, 255))
var/list/hsl = rgb2hsl(red.value || 0, green.value || 0, blue.value || 0)
var/list/light_col = hsl2rgb(hsl[1], hsl[2], max(min_lightness, hsl[3]))
shell_light_color = rgb(light_col[1], light_col[2], light_col[3])
var/list/hsl = rgb2num(rgb(red.value || 0, green.value || 0, blue.value || 0), COLORSPACE_HSL)
shell_light_color = rgb(hsl[1], hsl[2], max(min_lightness, hsl[3]), space=COLORSPACE_HSL)
/obj/item/circuit_component/light/input_received(datum/port/input/port)
if(parent.shell)