[css-color] hslToRgb corruption in css-color-4 version

Nearby typo: "as an a" -> "as a".  (css-color-4 version only.)


A simple error crept into the hslToRgb function in the conversion to
JavaScript: the initialization of t1 should be calculated from t2, not from t1.


I checked (manually) for any other logic change in hslToRgb.  The only
difference I found was the near-noop change of which expression is used for the
common light==0.5 case.  I see only minor arguments each way:

In favour of current css-color-4 version (<):
one shorter character; ‘<=’ doesn't match standard
mathematical notation; one fewer edit.

In favour of css-color-3 version (<=):
uses the easier-to-read expression for this significant case;
principle of not changing from CR css3-color;
a hair more efficient; and 2**-53 more accurate :).

(There's no symmetry argument either way given that light's
range includes both 0.0 and 1.0.)

I think different people would lean in different directions,
but my vote would go to <= (as in css-color-3).


pjrm.

Received on Tuesday, 28 January 2014 11:34:15 UTC