The functions from src/color in the d3 repo