This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/node_modules/d3-interpolate/src/lab.js
2025-01-11 09:54:09 +03:00

17 lines
450 B
JavaScript

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 + "";
};
}