I'm trying to generate a list of "successive" colors for a d3.js heatmap purpose. So, I'm looking for a function that takes in input a starting color (say red in hexadecimal), an ending color (say blue in hexadecimal), and an integer (the number of hexadecimal colors to generate in between that is returned as a form of a list.
build_colors(start_color,end_color,nb_colors) -> list of colors
I do not look for something too sophisticated (like sampling at constant speed on a geodesic between the two color-endpoints on a riemannian perceptual space)!
It may be rather easy but I am beginner with javascript / d3.js and basically all web-technologies.