"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const hex = require("./dist-es-value-types-color-hex.cjs");
const hsla = require("./dist-es-value-types-color-hsla.cjs");
const rgba = require("./dist-es-value-types-color-rgba.cjs");
const color = {
  test: (v) => rgba.rgba.test(v) || hex.hex.test(v) || hsla.hsla.test(v),
  parse: (v) => {
    if (rgba.rgba.test(v)) {
      return rgba.rgba.parse(v);
    } else if (hsla.hsla.test(v)) {
      return hsla.hsla.parse(v);
    } else {
      return hex.hex.parse(v);
    }
  },
  transform: (v) => {
    return typeof v === "string" ? v : v.hasOwnProperty("red") ? rgba.rgba.transform(v) : hsla.hsla.transform(v);
  }
};
exports.color = color;
//# sourceMappingURL=dist-es-value-types-color-index.cjs.map
