Colours ----- Setting the font colour according to the background colour of element, trying to maximize the contrast.
JavaScript
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.