CSS Color Picker Gradient
const col = document.body.appendChild(
document.createElement('div')
);
Object.assign(col.style, {
position: 'absolute',
left: 0, top: 0,
width: '100%',
height: '200px',
background: 'linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)'
});
CSS gradient that cycles hue – useful for a colorpicker. This is the main part of the snippet:
linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)