right-click on an existing marker of the z-scale (the number on the scale, or "add markers" if you need more). Now select "marker color". repeat as needed.
Easier would be using property nodes. Also have a look at the shipping examples, for example "Create IntGraph Color Table).