comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: HSB to RGB?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HSB to RGB? [message #5916] Wed, 13 March 1996 00:00
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
lgao@aol.com (LGAO) wrote:

> Hi,

> Does anyone know the equation to convert the color in
> HSB(hue,satriration,brightness) model to the color in RGB(red, green blue)
> model?

If you translate HSB into HLS (Hue, Lightness, Saturation) or HSB
(Hue, Saturation, Brightness) you can use the IDL procedure
COLOR_CONVERT to convert to and from RGB.

Is the conversion 1 to 1?

That depends upon the implementation and the color coordinate system
used: RGB is a cube, HSB is a cone and HLS is a double cone (if I
don't intermix HSB and HLS).

> Thanks.

> Li
Norbert Hahn
Re: HSB to RGB? [message #5930 is a reply to message #5916] Tue, 12 March 1996 00:00 Go to previous message
sterner is currently offline  sterner
Messages: 106
Registered: February 1991
Senior Member
lgao@aol.com (LGAO) writes:

> Does anyone know the equation to convert the color in
> HSB(hue,satriration,brightness) model to the color in RGB(red, green blue)
> model? Is the conversion 1 to 1?

Check the help for the IDL function color_convert. One of the
conversions it can handle is HSV to RGB, not far from what you need.
The online help also gives a useful reference.

Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: http://fermi.jhuapl.edu/s1r/people/res/res.html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: hooking external 'C' functions to IDL
Next Topic: What's best?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:58:12 PDT 2025

Total time taken to generate the page: 0.00532 seconds