Colormap that looks good when printed grayscale

버전 1.0.0.0 (12.3 KB) 작성자: Fab
Defining colors to exploit both the color and intensity contrasts good for grayscale
다운로드 수: 693
업데이트 날짜: 2015/10/13

라이선스 보기

The endless quest of defining a colormap that looks good when printed in grayscale has ended.
This library allows the definition of rgb colors so that they can be picked for maximum contrast between their Hue and the equivalent grayscale intensity. The library uses the HSV convention, and calculates the S and V values for other palettes required to reflect the grayscale intensity of the red color. In this way, you can input colors by specifying color type (Hue) and grayscale intensity (Int), and you can be assured that when multiple colors are printed in grayscale, the resulting intensity is matched. The library includes the matrix of S and V conversions "HSVBWColormap.mat" and the function HInt2RGB that creates RGB values.
Example on how to use the file, to define a 6 colors colormap. Note that, with the addition of white and black, this allows use of 8 colors when needed.

rgb(1,:)=HInt2RGB(1,100); % red, darkest
rgb(2,:)=HInt2RGB(7,82); % cyan, less dark
rgb(3,:)=HInt2RGB(3,64); % green, less dark
rgb(4,:)=HInt2RGB(9,46); % magenta, less dark
rgb(5,:)=HInt2RGB(2,28); % orange, less dark
rgb(6,:)=HInt2RGB(7,10); % blue cyan, lightest

X=[0 1 1 0];
Y=[0 0 1 1];

patch(X,Y,rgb(1,:));
patch(1+X,Y,rgb(2,:));
patch(2+X,Y,rgb(3,:));
patch(3+X,Y,rgb(4,:));
patch(4+X,Y,rgb(5,:));
patch(5+X,Y,rgb(6,:));

Note that the resulting darkness is decreasing, and the colors change maximizing contrast (change in Hue between adjacent patches is 120-180 deg).

ENJOY!!

인용 양식

Fab (2024). Colormap that looks good when printed grayscale (https://www.mathworks.com/matlabcentral/fileexchange/53499-colormap-that-looks-good-when-printed-grayscale), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Greyscale에 대해 자세히 알아보기
도움

도움 준 파일: squink(Colors,Gamma), jetwhite(Colours)

Community Treasure Hunt

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

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