import m from "../../utils/type.js";
import p from "../../utils/unpack.js";
import c from "../../chroma.js";
import r from "../../Color.js";
import t from "../input.js";
import h from "./oklch2rgb.js";
import i from "./rgb2oklch.js";
r.prototype.oklch = function() {
  return i(this._rgb);
};
const e = (...o) => new r(...o, "oklch");
Object.assign(c, { oklch: e });
t.format.oklch = h;
t.autodetect.push({
  p: 2,
  test: (...o) => {
    if (o = p(o, "oklch"), m(o) === "array" && o.length === 3)
      return "oklch";
  }
});
export {
  e as oklch
};
//# sourceMappingURL=index.js.map
