Improve contrast of hex codes on palette.

They were sometimes hard to read, in white on a light background. They now are
inverted if the color's value (from HSV) is larger than 60%.