const dark = document.getElementById("dark");
dark.addEventListener("click", function() {
const body = document.body;
body.classList.toggle("ddark")
})
.ddark {
background-color: #303030;
}
<img src="https://simg.nicepng.com/png/small/13-133407_pixel-heart-png-black-pixel-heart-icon-png.png" alt="" style="width:50px; height:50px;">
<button class="darkmode" id="dark">Go Dark</button>
Is there a way to modify or delete the image background color? The contrast in dark mode on my website is unattractive. How can this be resolved? Any suggestions?