chroma.js is a small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales.
An Observable notebook by Ricky Reusser
d3-scale-chromatic - Sequential, diverging and categorical color scales derived from ColorBrewer.