mbostock/d3 — pull request #833 by gunn (2012-10-01 04:38:12+00:00)
Title: Fix interpolation between a colour and black or white

Currently if you use `d3.interpolateHsl`or `d3.interpolateHcl ` to blend a colour with black, you get red shades introduced. If you do the same with white, you get green shades.

For example, blue + black equals purple:
```javascript
d3.interpolateHsl("#00f", "#000")(0.5)
//-> "#602060"
```

I would expect to see only shades of blue, from bright to dark.
Tweaking the input slightly gives us the expected result and shows where we're going wrong:

```javascript
d3.interpolateHsl("#00f", "#001")(0.5)
//-> "#000088"
```
I think the hue value for black and white should be ignored for interpolation. This pull request fixes it for HSL and HCL and adds tests for RGB.