Re: color swatch
- To: mathgroup at smc.vnet.net
- Subject: [mg65880] Re: [mg65853] color swatch
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 20 Apr 2006 05:15:11 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
AllColors does not list all colors.
Needs["Graphics`"];
ac = AllColors;
mc = DeleteCases[Select[Names[],
(Head[ToExpression[#]] == RGBColor ||
Head[ToExpression[#]] == GrayLevel) &],
_?(# == "System`Convert`" <>
"MathMLDump`$defaultColor" ||
# == "se" &)];
Length/@{ac,mc}
{180,235}
Bob Hanlon
>
> From: Mitch Murphy <mitch at mix5.com>
To: mathgroup at smc.vnet.net
> Subject: [mg65880] [mg65853] color swatch
>
> 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
>
>