The example in this article describes how to obtain the WEB safe color list using JavaScript. Share it with everyone for your reference. The details are as follows:
Web safety colors refer to eye protection colors, colors that make visitors’ eyes comfortable
//JavaScript取得216种WEB安全色值 var n = 0; var hex = new Array('FF', 'CC', '99', '66', '33', '00'); function colorPanel(){ for (var i = 0; i < 6; i++) { for (var j = 0; j < 6; j++) { for (var k = 0; k < 6; k++) { n++; var color = hex[j] + hex[k] + hex[i]; document.write(color + '<br />'); } } } }
I hope this article will be helpful to everyone’s JavaScript programming design.