@Incoming5643: that isn't needed, just use the image()'s color variable, like you can here:
https://github.com/tgstation/-tg-station/blob/master/code/modules/mob/living/carbon/human/update_icons.dm#L457

If you get an undefined variable, you are probably using icon(), use image() instead.