This uses R-colors table to translate color names to RGB [0-1] triplets.
examples:
colors
Opens a figure with all colors. Click on one to know its name and RGB triplet.
colors('violet')
ans =
0.9333 0.5098 0.9333
colors({'blue4','orchid'})
ans =
0 0 0.5451
0.8549 0.4392 0.8392
Maximilien Chaumon (2021). colors(name) (https://www.mathworks.com/matlabcentral/fileexchange/56006-colors-name), MATLAB Central File Exchange. Retrieved .
Inspired: Convert between RGB and Color Names
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
simple and useful. thank you
http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf