Kids
// Function to generate random RGBA color
function getRandomColor(opacity = 1) {
const r = Math.floor(Math.random() * 256);
const g = Math.floor(Math.random() * 256);
const b = Math.floor(Math.random() * 256);
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
}
// Target the h1 inside the .fusion-title class
const fusionTitleH1 = document.querySelector('.fusion-title-heading h1');
// Generate random colors for background and border
const randomBgColor = getRandomColor(0.8); // Background with 80% opacity
const randomBorderColor = getRandomColor(0.6); // Border with 60% opacity
// Apply the random colors to the targeted element
if (fusionTitleH1) {
fusionTitleH1.style.backgroundColor = randomBgColor;
fusionTitleH1.style.borderColor = randomBorderColor;
}