Consolodate color javascript. add index.