import { reverse3 as h } from "../../utils/index.js";
import p from "../../chroma.js";
import t from "../../Color.js";
import c from "../input.js";
import e from "./lch2rgb.js";
import i from "./hcl2rgb.js";
import m from "./rgb2lch.js";
import f from "../../utils/unpack.js";
import l from "../../utils/type.js";
t.prototype.lch = function() {
  return m(this._rgb);
};
t.prototype.hcl = function() {
  return h(m(this._rgb));
};
const n = (...r) => new t(...r, "lch"), u = (...r) => new t(...r, "hcl");
Object.assign(p, { lch: n, hcl: u });
c.format.lch = e;
c.format.hcl = i;
["lch", "hcl"].forEach(
  (r) => c.autodetect.push({
    p: 2,
    test: (...o) => {
      if (o = f(o, r), l(o) === "array" && o.length === 3)
        return r;
    }
  })
);
export {
  u as hcl,
  n as lch
};
//# sourceMappingURL=index.js.map
