function D=desat(C,s)
% desat(C,s)
% desaturate colormap - moves all colours towards
% a grey of roughly equivalent brightness
% C - colourmap (N by 3 matrix)
% s - saturation: 1 no change, 0 completely grey

% this matrix transforms to grey
G=[0.3 0.5 0.2]'*[1 1 1];
D=s*C + (1-s)*C*G;




