const n = (t) => {
  if (!t || typeof t != "string")
    return !1;
  const e = t.trim();
  return /^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
}, o = (t) => {
  if (!n(t))
    return "";
  const e = t.trim();
  let r = e.startsWith("#") ? e.slice(1) : e;
  return r.length === 3 && (r = r.split("").map((i) => i + i).join("")), `#${r.toLowerCase()}`;
};
export {
  n as isValidHexColor,
  o as normalizeHexColor
};
