Is there a node that can separate colors by scale?
The geometry node does what you want. The geometry node looks like this:

And has a vector output for position. The separate xyz node can be connected to that and it'll isolate the z component of the vector. Then you can use a math node set to greater than and a couple of mixRGB nodes to combine colors.
What's a vector and why does this work?
Vectors are extremely important for anything procedural in blender. Simply, a vector is a combination of 3 components. In this case these components are x, y, and z. A color (having r, g, and b components) can also be considered a vector. The geometry node outputs a vector which maps x, y, and z for every point on the mesh. It's difficult to work with a vector, though, because it's hard to deal with multiple things at once. It's much easier to work with a scalar, or a single component of the vector. The separate x, y, z node separates a position vector into 3 scalars which you can modify with normal math nodes. There's also a vector math node which can be used in this scenario, but it's not as easy to conceptualize.
Here's the whole node setup which outputs a 1 for every point above 0.5 on the z axis: