Oh, you should have started with that
Basically the color is the tangent, and all you need is a Vector Dot Product with the corresponding vector - Dot product with 0,0,1 (blue, up), to the power of some float and output as density will isolate particles whose tangent is nearly parallel to the up direction!
Do the same with Green and Red and use the Absolute value of the Dot Product just in case, and you have your filtering!
I used a PRT Hair with Tangent channel from the Max Hair&Fur output as color, and passed through an Absolute operator to remove the negative sign when pointing in the opposite direction.
Then the Magma used a Mux to pass the red, green, or blue vector as the one operand of the Dot product, and the Color(Tangent) as the second operand. The result to the power of 10.0 or 100.0 filters more or less of the points:
EDIT:
From geometry point of view, Vector Dot product represents the projection of the one vector onto the other, and is equivalent to the cosine of the angle between the two vectors. When the two vectors are perpendicular, the projection of the one vector onto the other is exactly 0.0. When the two are parallel and pointing in the same direction, the dot product is obviously one (the whole vector coincides with the other), which is cos(0.0)=1.0. If the two are parallel. but pointing in the opposite directions, the angle is 180 degrees and the Dot Product value is -1.0 (so we take the Absolute to remove the sign in that case to still produce 1.0).
This works in 3D space, so if you use the up vector (blue), any particle whose “color” tangent value is also pointing straight up will produce 1.0. A vector at 45 degrees to the reference direction will produce cos(45) = 0.707107. This is a significant Density to assign to a particle, but with a Power operator set to 10.0, you get 0.707107^10 = 0.0312501, much closer to 0.0. To the power of 100, it is practically 0.0!
Btw, the download from Dropbox failed with “Network Error” eventually, but I think my hair-based test is close enough to what you need…