import t from "../../Color.js";
import m from "../../chroma.js";
import p from "../../utils/type.js";
import o from "../input.js";
import h from "./hex2rgb.js";
import i from "./rgb2hex.js";
t.prototype.hex = function(r) {
  return i(this._rgb, r);
};
const n = (...r) => new t(...r, "hex");
m.hex = n;
o.format.hex = h;
o.autodetect.push({
  p: 4,
  test: (r, ...e) => {
    if (!e.length && p(r) === "string" && [3, 4, 5, 6, 7, 8, 9].indexOf(r.length) >= 0)
      return "hex";
  }
});
export {
  n as hex
};
//# sourceMappingURL=index.js.map
