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
@@ -182,7 +182,7 @@
new_color = input(user, "Choose a new color for [src]'s flashlight.", "Light Color",light_color) as color|null
if(!new_color)
return
if(color_hex2num(new_color) < 200) //Colors too dark are rejected
if(is_color_dark(new_color, 50) ) //Colors too dark are rejected
to_chat(user, span_warning("That color is too dark! Choose a lighter one."))
new_color = null
return set_flashlight_color(new_color)