An approach for generating an arbitrary number (N) of colors.
In HCL (Hue-Chroma-Luminance) color space:
This is the color scheme approach used in D3 Git History Streamgraph.