MATLAB: How to Change grayscale color

image processingImage Processing Toolbox

Hi Guys,
I have an image at the grayscale color and black background and I want to change the black background to white color and change the gray scale to pink scale that depends on concentration of color.
Can anyone tell me how I can do that?

Best Answer

cmap = pink(256); %pink!
cmap(1,:) = [1.0 1.0 1.0]; %replace first entry with white
colormap(cmap)
Related Question