Changed the way colours are set in the JS