delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/24/03:57:45

Message-ID: <3590B1D5.FE48D8BE@post.comstar.ru>
Date: Wed, 24 Jun 1998 11:59:17 +0400
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: Brian Bacon <kyberteknik AT geocities DOT com>,
"djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: Re: HSB to RGB conversion
References: <01bd9f42$77496ac0$c8c8c8c8 AT alpha>


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019