16进制色号: "#" + parseInt(Math.random() * 0xFFFFFF).toString(16);

rgb色号: "rgb(" + parseInt(Math.random()256) + ',' + parseInt(Math.random()256) + ',' + parseInt(Math.random()*256) + ')'

16进制色号: "#" + parseInt(Math.random() * 0xFFFFFF).toString(16);
rgb色号: "rgb(" + parseInt(Math.random()256) + ',' + parseInt(Math.random()256) + ',' + parseInt(Math.random()*256) + ')'
本文标题:创建一个随机的16进制色号 或者 rgb色号
本文链接:https://www.haomeiwen.com/subject/qgnjprtx.html
网友评论