See others/js/conversion.js for non-normative colorspace conversion code from the css-color-4 spec. The separate unit tests were generated by AI, as were the Temper versions of these files because being fixed manually. The others/csharp code was also translated by AI.
The current demo of the Temper code can be run as follows:
temper build
cd examples/csharp/ColorPick
dotnet run
Then choose an image and click on pixels. The label at bottom shows the RGB values at the clicked pixel, then the closest named color in RGB space then OKLab space.