import c from "./temperature2rgb.js";
import "../../utils/type.js";
import b from "../../utils/unpack.js";
const { round: i } = Math, f = (...p) => {
  const o = b(p, "rgb"), n = o[0], s = o[2];
  let e = 1e3, r = 4e4;
  const a = 0.4;
  let t;
  for (; r - e > a; ) {
    t = (r + e) * 0.5;
    const m = c(t);
    m[2] / m[0] >= s / n ? r = t : e = t;
  }
  return i(t);
};
export {
  f as default
};
//# sourceMappingURL=rgb2temperature.js.map
