You still want to add programmatically set colours. Let me try to give you more examples why most of the time it is an undesirable strategy.

- the main and the strongest point is that any styling should be done mostly in CSS. Almost any project requires designers. People who use HTML5, CSS and mockups to create usable and interesting interfaces. These people should be able to access all neccessary files easily and be able to experiment/create new interfaces. And most of the time they do not carry any knowledge of coding or JS. For this you want to structure your wdigets/code/tools in a such way that you have a markup in HTML, style in CSS and interactions in JS. Different people would find different file types useful for their needs. By allowing style changes in your JS you will create a usecase when styling would be changed "somehow" "somewhere" possibly deep in the JS code. It is not only confusing (because designers clearly see the rule in CSS but somehow it is overwritten) but also will force them to find those changes in JS code, which they most likely would not know(not even taking into consideration the complexity of the program they are looking at). Even for developers it could be hard to understand and to find.
- there is almost never a use case where you have colour defined in CSS and you want to overwrite it using JS. Why would you have a wrong colour in CSS on the first place? Why not to modify CSS instead of having "wrong" CSS styling and overwrite using JS