Message-ID: <3590B1D5.FE48D8BE@post.comstar.ru> Date: Wed, 24 Jun 1998 11:59:17 +0400 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: Comstar Ltd. MIME-Version: 1.0 To: Brian Bacon , "djgpp AT delorie DOT com" Subject: Re: HSB to RGB conversion References: <01bd9f42$77496ac0$c8c8c8c8 AT alpha> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Precedence: bulk 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)