interpolate.gamma(gamma)
Given that interpolate is one of interpolateRgb, interpolateCubehelix or interpolateCubehelixLong, returns a new interpolator factory of the same type using the specified gamma. For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space:
var interpolator = d3.interpolateRgb.gamma(2.2)("purple", "orange");
See Eric Brasseur’s article, Gamma error in picture scaling, for more on gamma correction.
Please login to continue.