Explanation
The CHOOSE function provides the framework for this formula.
When this formula is copied down, it will return one of the four colors.
Note that RANDBETWEEN will calculate a new value whenever the worksheet is changed.
The values provided to CHOOSE can include references.
RANDBETWEEN Function
The Excel RANDBETWEEN function returns a random integer between two given numbers.
RANDBETWEEN recalculates each time a worksheet is opened or changed.