3D scatter plot with color gradient

How can I create a 3D plot with a color gradient for the points? See the example below, which works for a 2D scatter plot. Edit (thanks to Chris): What I'm expecting to see from the 3D plot is a c...