How to execute firmware command from gcode
As your color is based on the temp reading, as far as I know, there is no G-code to read a temperature and push that value to another command.
The way you can do it is:


Static color change - use same method as you are setting to white
Intercept firmware temperature reading function and push that value to led module