I do not attribute it to you but I am under the impression you are missing the point of my post.
Which math is the "correct" math depends on what the intended result is. There is no "fail" in not doing something if not doing something is exactly in line with the intended result.
To me, it is obvious since a couple of posts ago, that we each, you, me and DawnBringer have different things in mind(this is what is causing the communication problem here) of which we unfortunately think under the same term "color balance".
Look back at the very beginning of the thread:
The theory is very simple - when you're adding +2 to red in the middle part of the values, if it finds a 20,20,20 color (a gray) it's going to make it 22,20,20, so from a gray it is now a gray-with-a-bit-more-red. If you take it really easy with this process, you can get an environmental effect, something like a soft bloom to work even for your pixel art.
So the premise was that we were looking for an algorithm that changes a neutral color like gray in a way that it gets tinted towards something else, so that it would end up not being that perfectly neutral gray.
The thread title says "color balancing" your pixel art. What you and DawnBringer have in mind is more like what "color balancing" is as described on Wikipedia, something that aims to keep neutral colors like gray neutral. That is also what I believe Photoshop attempts (the brightness preservation is a separate problem in any case regardless of the idea of what "color balancing" should encompass).
So "color balancing" here for the given premise could also be called "tint adjustment" or "channel mixing"(Photoshop has an option named like that as well and the results of that are comparable to what I implemented).
The algorithm I implemented is correct as it does exactly what it aimed to do, to make the tint adjustments as described in the opening post. It does not "fail" to take into account anything (I will not repeat my reasons for not even trying to preserve the brightness).
It probably should not be called "color balancing" though as that term seems to describe something other than what is described in the opening post. I guess I should rename it to "tint adjustment" plugin to avoid any confusion that might arise from what appears to be the commonly accepted idea of "color balancing" which is something different from what this does.