2 <meta name="viewport" content="width=device-width">
5 -webkit-clip-path: path("M 82 14 L 84 14 L 84 16 L 82 16 z");
14 window.addEventListener("load", () => {
15 const canvas = document.createElement("canvas");
18 const ctx = canvas.getContext("2d");
19 const images = document.querySelectorAll("img");
20 images.forEach(image => {
21 ctx.clearRect(0, 0, 10, 10);
22 const color = image.getAttribute("data-color");
23 ctx.fillStyle = color;
24 ctx.fillRect(0, 0, 10, 10);
25 image.src = canvas.toDataURL();
30 <img data-color="rgb(255, 57, 57)">
33 <img data-color="rgb(80, 169, 79)">
36 <img data-color="rgb(102, 102, 255)">
39 <img data-color="rgb(0, 255, 255)">
42 <img data-color="rgb(156, 156, 156)">
45 <img data-color="rgb(255, 176, 105)">
48 <img data-color="white">
51 <img data-color="rgb(118, 118, 118)">
54 <img data-color="rgba(0, 0, 0, 0.0)">