import "../../utils/type.js";
import c from "../../utils/unpack.js";
const { min: l, max: b } = Math, h = (...r) => {
  r = c(r, "rgb");
  let [i, n, o] = r;
  const a = l(i, n, o), e = b(i, n, o), m = e - a;
  let t, f, s;
  return s = e / 255, e === 0 ? (t = Number.NaN, f = 0) : (f = m / e, i === e && (t = (n - o) / m), n === e && (t = 2 + (o - i) / m), o === e && (t = 4 + (i - n) / m), t *= 60, t < 0 && (t += 360)), [t, f, s];
};
export {
  h as default
};
//# sourceMappingURL=rgb2hsv.js.map
