let palettes = {
	purple: {
		color: "#7D50FF",
		lightColor: "#CEC6FF",
	},

	orange: {
		color: "#FF5416",
		lightColor: "#FFB58D",
	},
};

window.addEventListener("load", () => {
	let shade = Math.random() > 0.5 ? "purple" : "orange";
	color = palettes[shade]["color"];
	lightColor = palettes[shade]["lightColor"];
	document.documentElement.style.setProperty("--color", color);
	document.documentElement.style.setProperty("--light-color", lightColor);

	var link = document.querySelector("link[rel~='icon']");
	if (!link) {
		link = document.createElement("link");
		link.rel = "icon";
		document.getElementsByTagName("head")[0].appendChild(link);
	}
	link.href = `favi-${shade}.ico`;
});
