You could put the Colors in an array and use the value of x to index that array.