Generate a random color code

PHOTO EMBED

Thu Jul 10 2025 11:23:19 GMT+0000 (Coordinated Universal Time)

Saved by @Huzaifa

const randomColor = function () {
  const hex = "01234566789ABCDEF";
  let color = "#";
  for (let i = 0; i < 6; i++) {
    color += hex[Math.floor(Math.random() * 16)];
  }
  return color;
};
content_copyCOPY