Color Picker using Neural Network

Given a background color, pick which color amongst white or black looks better on that background. Each time the user clicks the mouse a new random background color is generated.

Initially the NeuralNetwork is trained with 50000 different colors where it chooses 'black' color if the sum of input r,g,b colors is greater than 382 (because 255*3/2 is approximately 382) else it picks white color. Once the page has loaded the NN starts giving out predictions of which color looks best to which the user can further train the network by selecting which color looks best by simply clicking on either black or white.

There are multiple ways of training the Network, the method demonstrated here is just one of the many.