Thanks for the endorsement; that was a fun project and one that I was excited to share.
Yeah, white balance is really about two biases: 1) the color temperature of the light at the scene, and 2) the camera’s non-uniform spectral response. Both require see-sawing the channels so something in the scene that is supposed to be white is R=G=B.
In my fooling around with stuff, I’ve found two ways to shift the channels to a good white reference, one being the three channel multipliers and the other being introduction of the reverse bias in the color transform. To fool around with the latter, I took a target shot in daylight and processed it without white balance correction, then made a camera profile from it. And guess what, that profile when used in the color transform also corrected white balance. I posted a short treatise on it in a somewhat related thread a long time ago:
https://discuss.pixls.us/t/gimp-2-10-6-out-of-range-rgb-values-from-cr2-file/9532/192
This appears to be what darktable’s chromatic tools are doing, with a lot more sliders to confuse you…