Mail Archives: djgpp/1998/06/24/03:57:45
Brian Bacon wrote:
> Do you mean HSV to RGB or is HSB something different? If you mean the
> former and not the latter, then look at allegro's color.c, function
> rgb_to_hsv(), if you like I will send you the source...
>
> TTYL -Brian
Probably HSV is the same as HSB, look at the extraction from Photoshop help
file.
HSB model
The HSB model is based on the human perception of color. In the HSB model,
all colors are described in terms of three fundamental characteristics:
* Hue is the wavelength of light reflected from or transmitted through an
object. More commonly, hue is identified by the name of the color, such as
red, orange, or green. Hue is measured as a location on the standard color
wheel and expressed as a specific angle between 0œ and 360œ.
* Saturation, sometimes called chroma, is the strength or purity of the
color. Saturation represents the amount of gray in relation to the hue and is
measured as a percentage from 0 percent (gray) to 100 percent (fully
saturated).
* Brightness is the relative lightness or darkness of the color and is
usually measured as a percentage from 0 percent (black) to 100 percent
(white).
So, if this is the same I just take rgb_to_hsv(), if not , probably, somebody
clever then me can suggest convertion function based on
the information above ;)
--
____ ____
| \ / Dim Zegebart
____/____
Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multitasking kernel for Allegro (based on PDMLWP)
- Raw text -