TypeError: list indices must be integers, not str
17-01-25 21:52:47 homeassistant.core: Invalid service data for light.turn_on: None for dictionary value @ data['rgb_color']. Got '33,12,255'
well, for the first error, that is pretty simple, you are using the service light.turn_off and you are trying to pass it an rgb_color, which it cannot take.
I think the only way to resolve that is to not try to template your services inside the script and instead template your call to a given script.
For the 2nd error, it looks like states.light.television.attributes.rgb_color returns (R, G, B) instead of [R, G, B] (I donāt have any light components, so I canāt confirm). You can get around this with some string formatting.