Colorblind-proof two color scheme

The usual color scheme for showing co-localization is to overlay a red image and a green image and have the yellow portions show the sites of co-localization. This is problematic since red-green colorblind people cannot tell what is going on. Following up on the recent post on Daltonization, here’s a colorblind-proof color scheme for showing co-localization. It uses a standard 3-plane RGB scheme. One image only has information in the green channel, the other image has identical information in the red and blue channels. Overlapping portions are white. By using this color scheme, you can ensure that the figure’s information is intact for all three major colorblindness types, as illustrated above.

Here’s the MATLAB code for producing the image:


clear all

% initialize variables
a=zeros(128);               % monochrome image
b=a;                        % monochrome image
a_img=zeros([128 128 3]);   % RGB color planes
b_img=a_img;                % RGB color planes

% draw square gradients, monochrome from 0-1
a(16:48,48:80)=meshgrid(0.5:0.5/32:1);     % gradient
a(90:102,32:96)=1;
a(16:48,85:90)=1;
b(80:112,48:80)=meshgrid(0.5:0.5/32:1);    % gradient
b(26:38,32:96)=1;
b(80:112,85:90)=1;

% assign RGB color planes
a_img(:,:,2)=a;             % just the green color plane is assigned

b_img(:,:,1)=b;             % both the red and
b_img(:,:,3)=b;             % blue channels are assigned the same data

% display the data
imagesc(a_img+b_img)
caxis([0 1])
axis image off