You can change the color mapping of the surf. Example:
clear;clc;close all
tif4 = imread('RzwK3.tif');
THeight = rgb2gray(tif4(:,:,1:3));
imshow(THeight)
x = 1:size(THeight,1); % can be changed to coordinates
y = 1:size(THeight,2);
[X,Y] = ndgrid(x,y);
% make contour color on the surface
M = 4; % # color in contour
Cvec = parula(M); % any Mx3 RGB triplet
hs = surf(X,Y,THeight,'EdgeAlpha',.1);
colormap(Cvec)
colorbar
If parula or other color generation function is not available in your Matlab version, you can assign Cvec manually. Each row of the matrix is a RGB color triplet with values between 0 and 1 (you can divide a web RGB color by 256) and there should be M rows in the matrix. Example: the following is the output of parula(4), which can be manually input by replacing the line of code.
Cvec = [
0.2081 0.1663 0.5292; % R1 G1 B1
0.0265 0.6137 0.8135; % R2 G2 B2
0.6473 0.7456 0.4188; % R3 G3 B3
0.9763 0.9831 0.0538]; %R4 G4 B4
