import tinycolor from "tinycolor2";

export const getHexColorClasses = (hex: string) => {
  const base = tinycolor(hex);

  const textColor = base.darken(35).toHexString();
  const lightBg = base.lighten(50).setAlpha(0.3).toRgbString();
  const hoverBg = base.lighten(10).toHexString();
  const darkBg = base.setAlpha(0.3).toRgbString();
  const darkText = base.lighten(20).toHexString();

  return {
    backgroundColor: hex,
    textColor,
    lightBg,
    hoverBg,
    darkBg,
    darkText,
  };
};
