import { isThemeColorToken } from "./../_shared/theme-color-token.js";
function fromEntries(iterable) {
  return [...iterable].reduce((obj, [key, val]) => {
    obj[key] = val;
    return obj;
  }, {});
}
const isValidHexColor = (color) => color && /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{4})$/.test(color);
const getValidHexColor = (color) => color && isValidHexColor(color) ? color : void 0;
const getValidColorValue = (color) => color && (isValidHexColor(color) || isThemeColorToken(color)) ? color : void 0;
export {
  fromEntries,
  getValidColorValue,
  getValidHexColor
};
//# sourceMappingURL=utils.js.map
