%% Darken a Custom Colormap
% Create a downsampled version of the parula colormap. Then darken the colormap using a negative beta value.

mymap = parula(30);
newmap = brighten(mymap,-.5);

%
% Display a surface plot with the downsampled colormap.

surf(peaks);
colormap(mymap)

%
% Change the colormap to the darkened one.

colormap(newmap)

%
% Copyright 2012 The MathWorks, Inc.