Interpolating opacity.
mbostock opened this issue · 2 comments
mbostock commented
Now that it’s supported by d3-color, it would be nice to do here.
One tricky thing: CSS says that transparent is rgba(0, 0, 0, 0). A more natural representation in d3-color is rgba(NaN, NaN, NaN, 0), so the RGB channels can be inherited. Probably we should fix d3-color to set these channels to NaN if the opacity is zero, so that the existing interpolators will just work automatically.
mbostock commented
As of 0.4.1, d3-color treats transparent as rgb(NaN, NaN, NaN, 0) instead of rgb(0, 0, 0, 0).
mbostock commented
Shipped in 0.5.2.