|
|
| File Information |
| Description |
A simple utility to convert a ColorSpec value, represented as a string, to a numeric RGB triple. This function does not use eval. One possible use is for reading a user-entered color value from an editable text box.
Examples:
str2rgb('yellow') returns [1 1 0]
str2rgb('y') returns [1 1 0]
str2rgb('[1 1 0]') returns [1 1 0]
str2rgb('1 1 0') returns [1 1 0]
str2rgb('[1; 1; 0]') returns [1 1 0]
str2rgb('[0 0.5 0.91]') returns [0 0.5000 0.9100]
str2rgb('purple') returns NaN
str2rgb('[1 2]') returns NaN |
| Acknowledgements |
This submission has inspired the following:
GETRGB (v1.0)
|
| MATLAB release |
MATLAB 7.1.0 (R14SP3)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (7) |
| 03 Apr 2008 |
Jos x@y.z
|
|
|
| 03 Apr 2008 |
Kenneth Eaton
|
|
|
| 03 Apr 2008 |
Kenneth Eaton
|
|
|
| 04 Apr 2008 |
Jos (see profile)
|
|
|
| 04 Apr 2008 |
Kenneth Eaton
|
|
|
| 19 Dec 2008 |
alain boyer
|
|
|
| 19 Dec 2008 |
V. Poor
|
|
|
|
Contact us at files@mathworks.com