To apply a color gradient based on depth we need to start by applying that color gradient to the channel. To do this we can simply right click on the color bar for the selected channel and choose a new gradient. A rainbow coloring is particularly useful in this case, but any gradient can be used for this.