CSS3 colour draft: typo in hsl algorithm

In section 4.2.4 of the current CSS3 colour working draft
(http://www.w3.org/TR/2002/WD-css3-color-20020418/), there's an
algorithm for converting HSL to RGB representation. It includes the
lines:

       IF h<1: PUT h+1 IN h
       IF h>1: PUT h-1 IN h

In that first line, the comparison should be h<0, not h<1 (h>1 in the
second line is correct).

(Incidentally, is there any particular reason why the document includes
an algorithm for HSL->RGB but not RGB->HSL?)

-- 
Ross Smith ...................... Pharos Systems, Auckland, New Zealand

"C++ is to programming as sex is to reproduction. Better ways might
technically exist but they're not nearly as much fun." - Nikolai Irgens
 

Received on Thursday, 25 April 2002 18:43:10 UTC