we got COLORS (#30082)

This commit is contained in:
Contrabang
2025-08-11 20:22:08 -07:00
committed by GitHub
parent 19a5c33755
commit 83057e37d7
@@ -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