mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user