hmmm ... I see where everyone else is going, but my first thought was, pick a colour from a set like red, blue, green or yellow (ie. like the set of numbers in original problem).
So if above was what you were looking for I would place the colours in an array so you can use your number randomizer as the index and then have the user enter a colour.
Now the gotcha would be to remember that text matching is case sensitive, so blue and Blue are not the same, so it would be up to you on how you would either overcome this issue or just tell
the user he/she is wrong if not spelt the same