Change icon color like a RGB light

I using a light template and would like to change its icon color based on the light color.
How do i do that?

Thank you for your help.