Based on example from Generative Design Hello, Color P.1.0
book
The ability to directly influence 16, 777, 216 colours gives us amazing freedom. Simultaneous contrast–without which it would be be possible to perceive colors–is illustrated here by juxtaposing a number of color combinations...
The x-value of the mouse position defines the size of the inside colour field, the y-value the hue.
https://d3js.org/d3.v3.min.js
https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js