MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Getting Color *names* as strings?


How are you defining greens?  If you typed them out, couldn't you just make 
that a list of strings and then change PlotStyle to something like:
PlotStyle->ToExpression[greens[[k]]]

Good luck!

On Tue, 27 Jun 2006 03:14:46 -0400 (EDT), AES wrote
> Trying out different named Colors in a plot by using
> 
>    greens={CinnabarGreen, ChromeOxideGreen, CobaltGreen, etc};
> 
>    Do[ Plot[ func, range, PlotStyle -> greens[[k]],
>                     PlotLabel -> ToString[greens[[k]]] ] , 
>          {k, 1, Length[greens]} ];
> 
> Works fine -- except the PlotLabel comes out as "RGB[num, num, num]" --
>  and using SymbolName[greens[[1]]] or even SymbolName[CinnabarGreen] 
> does _not_ give the string "CinnabarGreen".
> 
> How can I get the *name* of each color as a string to put in PlotLabel 
> or in a Text label?
> 
> (Trivial problem, I agree, but just frustrating enough to be 
> interesting)





  • Prev by Date: Re: 3D Plot (or ListPlot?) Question
  • Next by Date: how to fit data with this specified functional form?
  • Previous by thread: Getting Color *names* as strings?
  • Next by thread: Re: Getting Color *names* as strings?