Made color settings a factory instead of javascript object.