{"id":475,"date":"2010-08-19T04:58:25","date_gmt":"2010-08-19T04:58:25","guid":{"rendered":"http:\/\/labrigger.com\/blog\/?p=475"},"modified":"2010-08-17T15:15:16","modified_gmt":"2010-08-17T15:15:16","slug":"colorblind-proof-two-color-scheme","status":"publish","type":"post","link":"http:\/\/labrigger.com\/blog\/2010\/08\/19\/colorblind-proof-two-color-scheme\/","title":{"rendered":"Colorblind-proof two color scheme"},"content":{"rendered":"<p align=\"center\"><a href=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2010\/08\/colorblindProofColorSheme.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2010\/08\/colorblindProofColorSheme.png\" alt=\"\" title=\"colorblindProofColorSheme\" width=\"600\" height=\"450\" class=\"aligncenter size-full wp-image-479\" srcset=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2010\/08\/colorblindProofColorSheme.png 600w, http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2010\/08\/colorblindProofColorSheme-300x225.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>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 <a href=\"http:\/\/labrigger.com\/blog\/2010\/07\/18\/daltonize-your-figures-for-the-colorblind-audience-members\/\">the recent post on Daltonization<\/a>, here&#8217;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&#8217;s information is intact for all three major colorblindness types, as illustrated above.<\/p>\n<p>Here&#8217;s the MATLAB code for producing the image:<\/p>\n<pre><font size=0>\r\nclear all\r\n\r\n% initialize variables\r\na=zeros(128);               % monochrome image\r\nb=a;                        % monochrome image\r\na_img=zeros([128 128 3]);   % RGB color planes\r\nb_img=a_img;                % RGB color planes\r\n\r\n% draw square gradients, monochrome from 0-1\r\na(16:48,48:80)=meshgrid(0.5:0.5\/32:1);     % gradient\r\na(90:102,32:96)=1;\r\na(16:48,85:90)=1;\r\nb(80:112,48:80)=meshgrid(0.5:0.5\/32:1);    % gradient\r\nb(26:38,32:96)=1;\r\nb(80:112,85:90)=1;\r\n\r\n% assign RGB color planes\r\na_img(:,:,2)=a;             % just the green color plane is assigned\r\n\r\nb_img(:,:,1)=b;             % both the red and\r\nb_img(:,:,3)=b;             % blue channels are assigned the same data\r\n\r\n% display the data\r\nimagesc(a_img+b_img)\r\ncaxis([0 1])\r\naxis image off\r\n<\/font><\/pre>\n","protected":false},"excerpt":{"rendered":"<p align=\"center\"><a href=\"http:\/\/labrigger.com\/blog\/wp-content\/uploads\/2010\/08\/colorblindProofColorSheme.png\"><\/a><\/p>\n<p>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&#8230;<\/p>\n<div class=\"read-more\"><a href=\"http:\/\/labrigger.com\/blog\/2010\/08\/19\/colorblind-proof-two-color-scheme\/\">Read More<\/a><\/div><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[24,26],"class_list":["post-475","post","type-post","status-publish","format-standard","hentry","category-software","tag-dissemination","tag-matlab"],"_links":{"self":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/comments?post=475"}],"version-history":[{"count":15,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/475\/revisions"}],"predecessor-version":[{"id":491,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/posts\/475\/revisions\/491"}],"wp:attachment":[{"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/media?parent=475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/categories?post=475"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/labrigger.com\/blog\/wp-json\/wp\/v2\/tags?post=475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}