MathGroup Archive 2009

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

Search the Archive

Re: Convert Hue[] to RGBColor[] and backwards

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103440] Re: [mg103428] Convert Hue[] to RGBColor[] and backwards
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 21 Sep 2009 07:09:30 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

In v7 there is ColorConvert

Table[ColorConvert[Hue[h], "RGBColor"], {h, 0, 1, 0.1}]

{RGBColor[1.,0.,0.],RGBColor[1.,0.6,0.],RGBColor[0.8,1.,0.],RGBColor[0.2,1.,0.],RGBColor[0.,1.,0.4],RGBColor[0.,1.,1.],RGBColor[0.,0.4,1.],RGBColor[0.2,0.,1.],RGBColor[0.8,0.,1.],RGBColor[1.,0.,0.6],RGBColor[1.,0.,0.]}

ColorConvert[#, "Hue"] & /@ %

{Hue[0.,1.,1.],Hue[0.1,1.,1.],Hue[0.2,1.,1.],Hue[0.3,1.,1.],Hue[0.4,1.,1.],Hue[0.5,1.,1.],Hue[0.6,1.,1.],Hue[0.7,1.,1.],Hue[0.8,1.,1.],Hue[0.9,1.,1.],Hue[0.,1.,1.]}

As can be seen, the conversions are somewhat approximate.


Bob Hanlon

---- Alexey Popkov <lehin.p at gmail.com> wrote: 

=============
Hello,
I have not found in the Documentation any information on relation
between Hue[] and RGBColor[] representations of color. How can I
convert one to another? 




--

Bob Hanlon



  • Prev by Date: Re: Convert Hue[] to RGBColor[] and backwards
  • Next by Date: Re: Generating best-fit line formula
  • Previous by thread: Re: Convert Hue[] to RGBColor[] and backwards
  • Next by thread: Re: Convert Hue[] to RGBColor[] and backwards