Color to index