const r = class {
};
let s = r;
s.normalizeColor = (t) => t > 255 ? 255 : t < 0 ? 0 : t;
s.getHexWithoutHash = (t) => {
  let o = t.replace("#", "");
  return o.length === 3 && (o = `${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`), o;
};
s.hexToRGB = (t) => {
  const o = r.getHexWithoutHash(t), e = parseInt(o.substring(0, 2), 16), n = parseInt(o.substring(2, 4), 16), l = parseInt(o.substring(4, 6), 16);
  return `${e},${n},${l}`;
};
s.shadeColor = (t, o) => {
  const e = r.getHexWithoutHash(t), n = parseInt(e, 16), l = r.normalizeColor((n >> 16) + o), a = r.normalizeColor((n & 255) + o), i = r.normalizeColor((n >> 8 & 255) + o);
  return `#${(a | i << 8 | l << 16).toString(16)}`;
};
s.lightenColor = (t, o) => r.shadeColor(t, o);
s.darkenColor = (t, o) => r.shadeColor(t, o * -1);
export {
  s as ColorUtils
};
