renamed color to index