Blame view

天文台pc/tianwentai-ui/node_modules/d3-interpolate/src/lab.js 450 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  import {lab as colorLab} from "d3-color";
  import color from "./color.js";
  
  export default function lab(start, end) {
    var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),
        a = color(start.a, end.a),
        b = color(start.b, end.b),
        opacity = color(start.opacity, end.opacity);
    return function(t) {
      start.l = l(t);
      start.a = a(t);
      start.b = b(t);
      start.opacity = opacity(t);
      return start + "";
    };
  }