'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var color = require('./color.js');
var lab = require('../../../../d3-color@3.1.0/node_modules/d3-color/src/lab.js');

function hcl(hue) {
  return function(start, end) {
    var h = hue((start = lab.hcl(start)).h, (end = lab.hcl(end)).h),
        c = color.default(start.c, end.c),
        l = color.default(start.l, end.l),
        opacity = color.default(start.opacity, end.opacity);
    return function(t) {
      start.h = h(t);
      start.c = c(t);
      start.l = l(t);
      start.opacity = opacity(t);
      return start + "";
    };
  }
}

var interpolateHcl = hcl(color.hue);

exports.default = interpolateHcl;
