Hi Alexey,
I am not sure what you want exactly either, but I’d probably try something like this:

but you might want to play with the blend mode of the second Color Mix Node, in order to get the effect you are looking for (or use a Math Node instead, if you don’t need the Factor).