Build custom colormaps

버전 1.0.0.0 (2.05 KB) 작성자: M Sohrabinia
Buillds any sequence of colormaps based on wrgbcmyk colors
다운로드 수: 3.5K
업데이트 날짜: 2013/2/14

라이선스 보기

This function can be used to build your own custom colormaps. Imagine if you want to display rainfall distribution map. You want a colormap which ideally brings rainfall in mind, which is not achieved by colormaps such as winter, cool or jet and such. A gradient of white to blue will do the
task, but you might also use a more complex gradient (such as white+blue+red or colors='wbr'). This function can be use to build any colormap using main colors rgbcmyk. In image processing, w (white) can be used as the first color so that in the output, the background (usually with 0 values) appears white. In the example of rainfall map, 'wb' will produce a rainfall density map where the background (if its DN values are 0) will appear as white.

Inputs:
colors: string (char) of color codes, any sequence of rgbcmywk
representing different colors (such as 'b' for blue) is acceptable. If a
gradient of white to blue is needed, colors would be 'wb'; a rainbow of
white+blue+red+green would be 'wbrg'.

Example:
[cmap]=buildcmap('wygbr');
%try the output cmap:
im=imread('cameraman.tif');
imshow(im), colorbar
colormap(cmap) %will use the output colormap

인용 양식

M Sohrabinia (2024). Build custom colormaps (https://www.mathworks.com/matlabcentral/fileexchange/40318-build-custom-colormaps), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
도움

줌: rgbmap color maps

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0