MathGroup Archive 2004

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

Search the Archive

Re: colored alphabet for string output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48255] Re: colored alphabet for string output
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 19 May 2004 05:20:52 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <c89pot$t2s$1@smc.vnet.net> <c8ch4c$emp$1@smc.vnet.net> <c8f26v$d48$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Information[ToColor]

show the usage message for it. It is in Mathematica since
version 4.0 but nobody add it to the help notebooks.

Regards
  Jens

Mike wrote:
> 
> I was unaware of ToColor. How did you find out about it?
> 
> I searched the online help guide and the only "hit" was for warning messages
> ToColor::
> 
> I guess this must be an undocumented function???
> 
> Mike
> 
> V5.0.1 on Mac OS X 10.3.3
> 
> On 18/5/04 6:22 PM, in article c8ch4c$emp$1 at smc.vnet.net, "Jens-Peer Kuska"
> <kuska at informatik.uni-leipzig.de> wrote:
> 
> > Hi,
> >
> > myList = {"abcdefg", "hijklmn", "prstuv"};
> >
> > randomColor[] := ToColor[Hue[Random[]], RGBColor];
> > colorString[str_String] := Module[{ss},
> >   ss = Characters[str];
> >   RowBox[StyleForm[#, FontColor -> randomColor[]] & /@ ss]
> >   ]
> >
> > colorString /@ myList // DisplayForm
> >
> > Regards
> > Jens
> >
> > Curt Fischer wrote:
> >>
> >> Dear Group:
> >>
> >> I have a long list of alphabetic strings.  I would like to ouput this list,
> >> with each of the letters of the string colored differently.  How could I do
> >> this?
> >>
> >> For example:
> >>
> >> myList = {"abcdefg","hijklmn","prstuv"};
> >>
> >> myList/.{x_String -> StringReplace[x, "a" -> StyleForm["a", FontColor ->
> >> Red]]}
> >>
> >> I was thinking to hodgepodge together statements like this, but it doesn't
> >> work because StringReplace requires objects with head String, and my attempt
> >> has an object with head StyleForm.
> >>
> >> Any advice?
> >>
> >> --
> >> Curt Fischer
> >


  • Prev by Date: RE: Re: Precision of output
  • Next by Date: Re: Extracting Coefficients and Powers
  • Previous by thread: Re: colored alphabet for string output
  • Next by thread: Re: colored alphabet for string output