The design is based on Lea Verou's excellent contrast ratio checker: http://leaverou.github.io/contrast-ratio/ Checks the contrast between the text and the background colors. If the contrast between the colors is not sufficient, another text color is suggested.
A Pen by Lavi Perchik on CodePen.