JavaScript 生成随机颜色

1585364631
2023-03-05 / 0 评论 / 292 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年03月05日,已超过1104天没有更新,若内容或图片失效,请留言反馈。

JavaScript 生成随机颜色

const color0x = () => {
  return `#${Math.floor(Math.random() * 256).toString(16).padStart(2, "0")}${Math.floor(Math.random() * 256).toString(16).padStart(2, "0")}${Math.floor(Math.random() * 256).toString(16).padStart(2, "0")}`;
};
0

评论 (0)

取消