You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
USAGE: color_vector= name2rgb(color_name)
Return the rgb vector of a color name.
EXAMPLE:
name2rgb2({'r', 'blue', 'pp', 'y'})
ans = 1 0 0 0 0 1 NaN NaN NaN 1 1 0
HISTORY:
Version 1.0, 2006-07-19.
Version 1.1, 2006-07-22:
- Much more efficient (and elegant?) code, thanks to Urs (us) Schwarz!
Copyright (C) Peder Axensten <peder@axensten.se>
Cite As
Peder Axensten (2026). name2rgb (https://uk.mathworks.com/matlabcentral/fileexchange/11750-name2rgb), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Convert between RGB and Color Names
General Information
- Version 1.0.0.0 (1.63 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | - Much more efficient (and elegant?) code, thanks to Urs (us) Schwarz! |
