/colours

Colours ----- Setting the font colour according to the background colour of element, trying to maximize the contrast.

Primary LanguageJavaScript

Colours

A simple JavaScript script which randomly generates a coloured box and sets a black or white font for the text displayed in it according to its luminance.