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