Extracting variable colorIndex