import { TWOPI as c } from "../../utils/index.js";
import m from "../../utils/unpack.js";
const { min: f, sqrt: l, acos: p } = Math, h = (...e) => {
  let [o, r, s] = m(e, "rgb");
  o /= 255, r /= 255, s /= 255;
  let t;
  const a = f(o, r, s), n = (o + r + s) / 3, i = n > 0 ? 1 - a / n : 0;
  return i === 0 ? t = NaN : (t = (o - r + (o - s)) / 2, t /= l((o - r) * (o - r) + (o - s) * (r - s)), t = p(t), s > r && (t = c - t), t /= c), [t * 360, i, n];
};
export {
  h as default
};
//# sourceMappingURL=rgb2hsi.js.map
