Color spaces! RGB, HSL, Cubehelix, Lab and HCL (Lch).
d3d3-modulecolorrgbhsllabhcllchcubehelix
https://d3js.org/d3-color/