import { isString as l, singleColorRegex as i, floatRegex as c } from "../utils.es.js";
const h = (r, o) => (t) => Boolean(l(t) && i.test(t) && t.startsWith(r) || o && Object.prototype.hasOwnProperty.call(t, o)), f = (r, o, t) => (a) => {
  if (!l(a))
    return a;
  const [s, n, p, e] = a.match(c);
  return {
    [r]: parseFloat(s),
    [o]: parseFloat(n),
    [t]: parseFloat(p),
    alpha: e !== void 0 ? parseFloat(e) : 1
  };
};
export {
  h as isColorString,
  f as splitColor
};
//# sourceMappingURL=utils.es.js.map
