One texture with different color tints


I have a cube with one packed texture but the texture has four different parts(metal/clean metal/rubber/plastic). Each part has its own mask in another packed texture. Also there is alpha channel with another mask for scratches in the same packed mask texture. I use separate color nodes for each cube part(except clean metal) to change its base color. Everything is working fine except one thing. I do not know how to combine all the changed color parts into one base color. I have three different lerp nodes but no idea how to stitch them together without overlying.

PS. The scratch mask is separate in alpha channel because I would like to be able to control scratched area color individually as well. But this is not added to this tree yet.