Based on https://gist.github.com/randompast/266276b1001ab6d3f42703ae4a335333
and using the CIE/RGB library from https://github.com/usolved/cie-rgb-converter