You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
278 B
10 lines
278 B
1 year ago
|
import {scaleSequential} from "d3-scale";
|
||
|
import {interpolateRgbBasisClosed} from "d3-interpolate";
|
||
|
import colors from "./colors";
|
||
|
|
||
|
export default function(range) {
|
||
|
var s = scaleSequential(interpolateRgbBasisClosed(colors(range))).clamp(true);
|
||
|
delete s.clamp;
|
||
|
return s;
|
||
|
}
|