File Exchange

image thumbnail

colors(name)

version 1.0.0.0 (19 KB) by Maximilien Chaumon
Return RGB color triplet for a color name.

4 Downloads

Updated 21 Mar 2016

View License

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

Updates

1.0.0.0

add figure

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Convert between RGB and Color Names