Hopefully in the next few weeks I’ll finally have more time to resume doing some work on various opensource projects.
One thing that came to mind which is semi-related after reading LRGB composition via command line - linear or nonlinear? - #9 by RandomThoughts is that it might be beneficial to do that sort of blending operation in a more deterministic “perceptually linear” space such as JzAzBz , rather than doing nondeterministic stretching/histogram modification operations - see JzCzhz color space - #9 by snibgo for some of the discussion on that. JzAzBz is a relatively new development in colorspaces, with the original research paper for it being published in 2017.