Do I understand that you fully made this material yourself? This does changes my understanding of the situation. Looks like you made a setup too complex for yourself to understand and debug. You know which aspects of your material aren’t mixing properly, but can you even find the actual nodes that are failing in all that spaghetti?
It would surely be possible to label the setup better? If I understand correctly, you have made a bunch of blocks of nodes, each one doing one specific aspect of the material, and you have a big line of mixRGB nodes that combine all those blocks together. These mixRGB nodes are the part I find hard to follow: nothing is labeled and they take all their inputs from random distant places.
I would start by giving names to the mix nodes (select the node, then press F2), using those names to explain what the node does, what parts does it combine.
Then, I would add reroute nodes to the wires, close to their end point where they connect. Reroute nodes can be used to make wires that branch, but they can also be named, allowing you to label a wire. That way, you know what is plugged into each socket at a glance without having to follow each wire to its source every time to remember.
When that is done, you might be able to identify the exact point your node tree is failing much quicker. Maybe one of the mix nodes just needs a different blending mode? I would rather not have to guess by trial and error.
An other thing I might try if the first option isn’t useful is to test the setup in an incomplete form. Make a copy of the material for testing, then start deconstructing the node tree backwards, removing the last part of the chain and undoing the material in the opposite order you built it until you find the point where the problem disappears. Then, you will know anything before that point cannot be in cause.
I see you are doing lighting inside the material. Is there a reason it needed to be done inside the material and not directly with lights?
If I understand correctly, you light this material using only red, green and blue lights and the material re-colors the 3 channels to whatever you choose? But this also means that if any other light color is present, it will count for multiple channels, so you will get mixes of the colors you have chosen, limiting your lighting options.