MathGroup Archive 2007

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

Search the Archive

Defining the Legacy Colors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77322] Defining the Legacy Colors
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Wed, 6 Jun 2007 07:33:40 -0400 (EDT)
  • References: <f295kp$n4k$1@smc.vnet.net> <30568553.1179316638063.JavaMail.root@m35> <op.tsfni5p3qu6oor@monster.ma.dl.cox.net> <13780686.1179343455242.JavaMail.root@m35> <op.tsfrtfb3qu6oor@monster.ma.dl.cox.net>
  • Reply-to: drmajorbob at bigfoot.com

Correcting an earlier post...

I don't know why I thought that was working, but today it certainly isn't!

But the code below does the trick.

First a test. PaleGreen is a legacy color, no longer defined in version 6:

?PaleGreen

Information::notfound: Symbol PaleGreen not found. >>

There are 176 legacy colors, apparently, but this retrieves them all:

define = ToExpression[# <> "=ColorData[\"Legacy\",\"" <> # <>
      "\"]"] &;
names = Select[First@ColorData["Legacy", "Range"], ! NameQ[#] &];
Length@names
define /@ names;

176

?PaleGreen

Global`PaleGreen

PaleGreen=RGBColor[0.596103,0.984298,0.596103]

Bobby

On Wed, 16 May 2007 15:13:53 -0500, DrMajorBob <drmajorbob at bigfoot.com> 
wrote:

> This recovers the legacy colors (those that aren't now built-in):
>
> SymbolQ[#] =
>    ColorData["Legacy", #] & /@
>     Select[First@ColorData["Legacy", "Range"], ! NameQ[#] &];
>
> Bobby

DrMajorBob at bigfoot.com


  • Prev by Date: Re: unevaluated expression [CORRECTION]
  • Next by Date: Iterate Through a List
  • Previous by thread: Re: A wrong definite integral in 5.0? (2nd response)
  • Next by thread: Iterate Through a List