This function automatically converts any colormap supplied as an argument into a color-blind-friendly colormap, by adjusting color saturation.
Example of use:
N = 5 ;
colors = parula(N) ;
x = [1:5]' ;
figure("Position",[100 100 400 300]) ;
for i = 1:N
plot(x,i*x,"-o","Color",colors(i,:),"LineWidth",2,"MarkerFaceColor",colors(i,:)) ;
hold on ;
end
hold off ;
title("Figure with original parula colormap") ;
colors2 = daltonize(parula(N)) ;
figure("Position",[100 100 400 300]) ;
for i = 1:N
plot(x,i*x,"-o","Color",colors2(i,:),"LineWidth",2,"MarkerFaceColor",colors2(i,:)) ;
hold on ;
end
hold off ;
title("Figure with adjusted parula colormap") ;
Cite As
phenan08 (2024). daltonize (https://www.mathworks.com/matlabcentral/fileexchange/155929-daltonize), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |