| 
| Subject: | seams the hsl method has a bug, here... | 
|---|
 | Summary: | Package rating comment | 
|---|
 | Messages: | 1 | 
|---|
 | Author: | VD | 
|---|
 | Date: | 2010-01-21 18:04:34 | 
|---|
 |  |  |  | 
VD rated this package as follows:
| Utility: | Insufficient | 
|---|
| Consistency: | Sufficient | 
|---|
| Examples: | Sufficient | 
|---|
|  | 
  VD - 2010-01-21 18:04:34seams the hsl method has a bug, here is the source code from my test:
 <?php
 function map( $value, $iStart, $iStop, $oStart, $oStop )
 {
 return ( $oStart + ($oStop - $ostart) * (($value - $iStart) / ($iStop - $iStart)) );
 }
 require_once "class_color.inc.php";
 $c = new color();
 $c->set_from_rgbhex("606040");
 $hsl = $c->get_hsl();
 ?>
 <pre>
 <b>class Color returns</b>
 <?php print_r( $hsl ); ?>
 <b>should return:</b>
 hue =>  60 or <?=map(60,0,359,0,1)?>
 saturation  => 33 or <?=map(33,0,100,0,1)?>
 brigthness  => 38 or <?=map(38,0,100,0,1)?>
 <pre>
 |