Selecting NON-RGB colors in a Color ID mask for material blending

making a dot product betwen the texture and the desired color will give you a mask. apply a power node to that and you can adjust your threshold(dont forget to clamp the result). not perfect, but easy and fairly cheap.