Declare all vars at the top of function If the R, G or B values have less than 50% saturation or we have a high yellow like color, use a white text color, otherwise black Set that on both the X&Y preview and the clicked color preview