MathGroup Archive 2006

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

Search the Archive

color swatch

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65853] color swatch
  • From: Mitch Murphy <mitch at mix5.com>
  • Date: Tue, 18 Apr 2006 06:56:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

hi,

somebody else might find this snippet of code useful. it creates a  
four page color swatch of all colors available in mathematica (ie.  
AllColors).

--------------------

swatch[i_] :=
       Graphics[{ToExpression[AllColors[[i]]], Rectangle[{0, 0}, {1,  
1}]},
	AspectRatio -> 1, PlotLabel -> AllColors[[i]]];

w = 600;

Show[GraphicsArray[Table[swatch[6i + j], {i, 0, 7}, {j, 1,
       6}]], ImageSize -> w];
Show[GraphicsArray[Table[swatch[6i + j], {i, 8, 15}, {j, 1,
6}]], ImageSize -> w];
Show[GraphicsArray[Table[swatch[6i + j], {i, 16, 13}, {j,
         1, 6}]], ImageSize -> w];
Show[GraphicsArray[Table[swatch[6i + j], {i, 24, 29}, {j,
1, 6}]], ImageSize -> w];


--------------------

cheers,
Mitch


  • Prev by Date: Re: MathLink and Sparse Matrices
  • Next by Date: Re: Problem with limiits
  • Previous by thread: Re: MathLink and Sparse Matrices
  • Next by thread: Re: color swatch