colours

Interpolating (hex) colour values

In visualizations, it is often desirable to be able to display gradations of colour, or to interpolate from one colour to another. When plotting data from a dataframe, we would like to be able to do this automatically from any one colour to any other colour. For instance, if we want to plot a number of distinct colours but want the transition from one to the next to be gradual. This post shows how to do this easily and neatly.

What happened to earlier blog posts?

This website was overhauled in December 2021. I will gradually be converting some of the blog posts on the old website to the new format, but this is a low priority item, so it may take a while.