From 83057e37d7561b03b283eb031e38f064eb202e6c Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Mon, 11 Aug 2025 20:22:08 -0700 Subject: [PATCH] we got COLORS (#30082) --- code/modules/tgui/modules/colour_matrix_tester.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/tgui/modules/colour_matrix_tester.dm b/code/modules/tgui/modules/colour_matrix_tester.dm index 04398a54495..b2f17e6c3d0 100644 --- a/code/modules/tgui/modules/colour_matrix_tester.dm +++ b/code/modules/tgui/modules/colour_matrix_tester.dm @@ -3,7 +3,7 @@ /// The datum we are modifying. This will almost always be an atom, but clients have colours too var/datum/target_datum // Target colour matrix to make applying easier - var/target_matrix = list( + var/list/target_matrix = list( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, @@ -18,6 +18,13 @@ return target_datum = target + if(islist(target:color)) + target_matrix = target:color + target_matrix.Cut(17, 0) // get down to a 4x4 matrix + else if(istext(target:color)) + target_matrix[1] = GETREDPART(target:color) / 255 + target_matrix[6] = GETGREENPART(target:color) / 255 + target_matrix[11] = GETBLUEPART(target:color) / 255 /datum/ui_module/colour_matrix_tester/ui_state(mob/user) return GLOB.admin_state