used switch statement for array of colors