How can I access displacement modifier z coordinates in the shader editor?
Your modifier displaces the geometry by +/- 1000 units (I suggest setting the midlevel back to 0.5 by the way), but your color ramp only effectively differentiates colors in your geometry between 0 and 1 units.
You could also set the midlevel to 0, and set your plane origin to geometry so that the displacement only raises the geometry.
I'm saying that because you should use the &quot;Object&quot; output which Z coordinate will be negative if it is located under the object origin. That way you can deal with this information only by dividing the Z coordinate by the strength of your modifier. That will give you the full range of height of your mesh, normalized between 0 and 1, perfect for a color ramp.
In short : Use the object output, but move the origin of the object lower (or raise your geometry in edit mode) and plug a math node set to divide by [the same strength as your displace modifier] between the separate XYZ and the color ramp node.