Rather than set styles, set a class name based on color index.

I wonder if cs->js added that first soft bracket but it should not be here