Code covered by the BSD License  

Highlights from
show_colors.m

1.5

1.5 | 2 ratings Rate this file 0 Downloads (last 30 days) File Size: 2.83 KB File ID: #24109

show_colors.m

by Phillip M. Feldman

 

13 May 2009 (Updated 17 May 2009)

generates a labeled plot showing all colors recognized by RGB.m

| Watch this File

File Information
Description

 This Matlab script defines RGB values and English names for a set of 21 colors and then generates a labeled plot showing all of these colors with the corresponding name or names for each. show_colors is also useful as a demonstration for how to use RGB.m to generate Matlab plots with multiple colors.

show_colors depends on cell2num.m and fig.m.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements show_colors depends on cell2num.m and fig.m.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
14 May 2009 us

unfortunately, this script does not run due to missing functions

- cell2num
- fig

us

16 May 2009 Ilana Nisky

Cute idea.
The code does not run unless:
 the cell2num command is changed to cell2mat
and
the fig commant is changed to figure, for example by the following 2 lines:
handle= figure(1);
set(handle,'Position',[100,100, 1000, 900])

17 May 2009 Phillip M. Feldman

Actually, fig is available (separate download). cell2num was missing, but I've submitted it now.

17 May 2009 Ilana Nisky

After writing the comment I browesed the file exchange for a while and I ran into the fig function... Liked the fig function as well :) Any way, I find the colors.m helpful - it is always annoying to choose the colors by guessing...

17 May 2009 John D'Errico

Perhaps fig may be available on the internet, but where? Give a link. Is it really that difficult to be friendly to those who might try to download your work? Is it really necessary for others to be forced to do these searches to find out how to use your code?

IF your code uses something that will not be available in MATLAB proper, then tell people about it. If it uses a toolbox function, then show that toolbox as a dependency. If it uses another FEX submission, then tell people about it. Put a link in your code that shows where to find it. Do NOT post code that has dependencies without that information, as this then is non-working code. Non-working code is by definition poor.

Please login to add a comment or rating.
Updates
17 May 2009

I've fixed the comments to indicate that show_colors depends on cell2num.m and fig.m.

Tag Activity for this File
Tag Applied By Date/Time
rgb Phillip M. Feldman 14 May 2009 09:41:01
colors Phillip M. Feldman 14 May 2009 09:41:01
named colors Phillip M. Feldman 14 May 2009 09:41:01

Contact us at files@mathworks.com