function colrmap()

format long;
index_range = -1:0.05:1;
size_i = size(index_range)
c_map2 = zeros(size_i(2),3);
for i = 1:size_i(2)
	ind_i = index_range(i);
	if ind_i<=-0.5
		c_map2(i,1) = 13/255;
		c_map2(i,2) = 13/255;
		c_map2(i,3) = 13/255;
	elseif ind_i>-0.5 & ind_i <= -0.2
		c_map2(i,1) = 191/255;
                c_map2(i,2) = 191/255;
                c_map2(i,3) = 191/255;
	elseif ind_i>-0.2 & ind_i <= -0.1
                c_map2(i,1) = 219/255;
                c_map2(i,2) = 219/255;
                c_map2(i,3) = 219/255;
	elseif ind_i>-0.1 & ind_i <= 0
                c_map2(i,1) = 235/255;
                c_map2(i,2) = 235/255;
                c_map2(i,3) = 235/255;
	elseif ind_i>0 & ind_i <= 0.025
                c_map2(i,1) = 254/255;
                c_map2(i,2) = 250/255;
                c_map2(i,3) = 202/255;
	elseif ind_i>0.025 & ind_i <= 0.05
                c_map2(i,1) = 238/255;
                c_map2(i,2) = 232/255;
                c_map2(i,3) = 182/255;
	elseif ind_i>0.05 & ind_i <= 0.075
                c_map2(i,1) = 222/255;
                c_map2(i,2) = 218/255;
                c_map2(i,3) = 157/255;
	elseif ind_i>0.075 & ind_i <= 0.1
                c_map2(i,1) = 205/255;
                c_map2(i,2) = 200/255;
                c_map2(i,3) = 132/255;
	elseif ind_i>0.1 & ind_i <= 0.125
                c_map2(i,1) = 191/255;
                c_map2(i,2) = 183/255;
                c_map2(i,3) = 108/255;
	elseif ind_i>0.125 & ind_i <= 0.15
                c_map2(i,1) = 175/255;
                c_map2(i,2) = 195/255;
                c_map2(i,3) = 98/255;
	elseif ind_i>0.15 & ind_i <= 0.175
                c_map2(i,1) = 164/255;
                c_map2(i,2) = 205/255;
                c_map2(i,3) = 87/255;
	elseif ind_i>0.175 & ind_i <= 0.2
                c_map2(i,1) = 127/255;
                c_map2(i,2) = 179/255;
                c_map2(i,3) = 71/255;
	elseif ind_i>0.2 & ind_i <= 0.25
                c_map2(i,1) = 111/255;
                c_map2(i,2) = 161/255;
                c_map2(i,3) = 64/255;
	elseif ind_i>0.25 & ind_i <= 0.3
                c_map2(i,1) = 96/255;
                c_map2(i,2) = 150/255;
                c_map2(i,3) = 54/255;
	elseif ind_i>0.3 & ind_i <= 0.35
                c_map2(i,1) = 79/255;
                c_map2(i,2) = 138/255;
                c_map2(i,3) = 46/255;
	elseif ind_i>0.35 & ind_i <= 0.4
                c_map2(i,1) = 65/255;
                c_map2(i,2) = 125/255;
                c_map2(i,3) = 37/255;
	elseif ind_i>0.4 & ind_i <= 0.45
                c_map2(i,1) = 48/255;
                c_map2(i,2) = 110/255;
                c_map2(i,3) = 27/255;
	elseif ind_i>0.45 & ind_i <= 0.5
                c_map2(i,1) = 34/255;
                c_map2(i,2) = 96/255;
                c_map2(i,3) = 19/255;
	elseif ind_i>0.5 & ind_i <= 0.55
                c_map2(i,1) = 15/255;
                c_map2(i,2) = 83/255;
                c_map2(i,3) = 105/255;
	elseif ind_i>0.55
                c_map2(i,1) = 2/255;
                c_map2(i,2) = 69/255;
                c_map2(i,3) = 0/255;
	else
		c_map2(i,1) = 254/255;
                c_map2(i,2) = 250/255;
                c_map2(i,3) = 202/255;
	end
end
c_map = c_map2;
%c_map
max(c_map)
c_map
xsc = -1:0.1:1;
sizexsc = size(xsc)
obj = zeros(10,sizexsc(2));
for i = 1:10
	obj(i,:)=xsc;
end
obj;
colormap(c_map);

imagesc(obj);
axis square tight		
axis off
		ndviname = "sampleobj.png";
		saveas(1,ndviname,'png')

end
