Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
simple color scale function using HSL
function numToColor (num, maxHue = 350, minHue = 0) {
const hue = num * (maxHue - minHue) + minHue
return `hsl(${hue}, 70%, 45%)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment