"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const utils = require("../utils.js");
const isColorString = (type, testProp) => (v) => {
  return Boolean(utils.isString(v) && utils.singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));
};
const splitColor = (aName, bName, cName) => (v) => {
  if (!utils.isString(v))
    return v;
  const [a, b, c, alpha] = v.match(utils.floatRegex);
  return {
    [aName]: parseFloat(a),
    [bName]: parseFloat(b),
    [cName]: parseFloat(c),
    alpha: alpha !== void 0 ? parseFloat(alpha) : 1
  };
};
exports.isColorString = isColorString;
exports.splitColor = splitColor;
//# sourceMappingURL=utils.js.map
