MathGroup Archive 2007

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

Search the Archive

Re: float -> RGB

  • To: mathgroup at
  • Subject: [mg83613] Re: float -> RGB
  • From: Bill Rowe <readnewsciv at>
  • Date: Sun, 25 Nov 2007 04:29:35 -0500 (EST)

On 11/24/07 at 4:15 AM, alexxx.magni at wrote:

>Greetings, I need to convert a float number in 0..1 to RGB values -
>according to whichever palette you choose. How do you do it in Math,
>and which is the model underlaying the transformation?

There is no way to do precisely what you seem to be asking. The
problem is a complete color specification in any of the standard
models requires 3 numbers. You could use Hue. A single value
while not sufficient to cover the entire color space is
sufficient to choose a particular color with default saturation
and brightness, i.e.


will display a cyan colored disk.
To reply via email subtract one hundred and four

  • Prev by Date: Re: Plot3D
  • Next by Date: Re: VectorFieldPlot Arrows
  • Previous by thread: Re: float -> RGB
  • Next by thread: Re: Contour Lines