MathGroup Archive 2007

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

Search the Archive

Re: ColorSchemes Palette

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78290] Re: [mg78203] ColorSchemes Palette
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Wed, 27 Jun 2007 05:39:27 -0400 (EDT)
  • References: <27987695.1182851279803.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

BTW, the two approaches can be used interchangeably after executing

define = ToExpression[# <> "=ColorData[\"Legacy\",\"" <> # <>
      "\"]"] &;
names = Select[First@ColorData["Legacy", "Range"], ! NameQ[#] &];
define /@ names;
color[] := ColorData["Legacy", "Range"]
color[c_RGBColor] := c
color[s_String] := ColorData["Legacy", s]
color[c_Symbol] := color[SymbolName[c]]

color[RawUmber] == color["RawUmber"] == RawUmber

True

That may be useful if you have legacy code expecting RawUmber to be a 
defined symbol, but you also have newer code that uses the color[]  
function.

Bobby

On Tue, 26 Jun 2007 03:05:06 -0500, David Park <djmpark at comcast.net> wrote:

> If one does much work with colors it is quite convenient to have the
> ColorSchemes palette up and in a convenient place. However, I find that  
> this
> palette has some undesirable properties. It does not remember either its
> position or state between Mathematica sessions such as the  
> BasicMathInput or
> SpecialCharacters palettes do.
>
> I went to the Wolfram files and made a copy of the ColorSchemes.nb and 
> saved
> it in one of my own folders - just in case of problems. Then I opened
> Mathematica, brought up the ColorSchemes palette and used the Option
> Inspector on it to change:
>
> Notebook Options
>  File Options
>   Editable changed to True
>   Saveable changed to True
>   ClosingAutoSave changed to True
>
> This worked and the palette now remembers both its position and state and
> appears to function properly. However, I wondered if there was a reason  
> that
> WRI set those options to False?
>
> Another feature of the ColorSchemes palette that I dislike is the  
> operation
> of the slider bars. They are hardly adequate for scrolling through the
> colors and schemes, being too sensitive when the list is long.  They  
> would
> be much better if a "LeftStepButton" and "RightStepButton"  (or in this  
> case
> up and down) could be added to the controls, or if once one had selected  
> a
> color or scheme, the up/down arrow keys could be used to scroll through  
> the
> list.
>
> For those who are used to using the old named colors in the  
> Graphics`Colors`
> package and are now dismayed at the great amount of typing needed in the  
> new
> scheme the following routine might be useful:
>
> color[] := ColorData["Legacy", "Range"]
> color[c_] := ColorData["Legacy"][SymbolName[c]]
>
> color[]
>
> color@RawUmber
>
> In general, the additional typing is worth the richness of the new color
> schemes.
>
>



-- 

DrMajorBob at bigfoot.com


  • Prev by Date: Re: ColorSchemes Palette
  • Next by Date: Re: extracting fractional powers of series expansion?
  • Previous by thread: Re: ColorSchemes Palette
  • Next by thread: RE: "Elastic string" (type of traveling-salesman) paradigm for sampling discrete data sets