How to Make Color Picker Tools on Blogger Static Pages

How to Make Color Picker Tools on Blogger Static Pages

Sunday, 26 January 2020

How to Make Color Picker Tools on Blogger Static Pages - Color Picker or color picker that has nothing else to choose from a variety of colors. It's not just me-ji-ku-hi-bi-ni-u , but many colors.

Which is displayed with certain unique codes that are used to design the Website.

Well, in this article I will give a tutorial on how to make kyayang written in an article titled  How to Make Color Picker Tools on Blogger Static Pages.

How To Make Tools Color Picker in Blogger

1. Sign in to Blogger you

2. Select Page -> New Page

3. Enter HTML mode instead of Compose !

4. Paste the script code below.
<input id="inputColor" type="color" value="#ff1a1a" />
<button onclick="getColor()">Get Color</button>
<br />
<div id="colorHex">
</div>
<div id="colorRGB">
<script>
function getColor() {
    document.getElementById("colorHex").innerHTML = 'HEX : ' + document.getElementById("inputColor").value;
    document.getElementById("colorRGB").innerHTML = 'RGB : '+ hexToRgb(document.getElementById("inputColor").value);
}
function hexToRgb(hex) {
    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    var r = parseInt(result[1], 16);
    var g = parseInt(result[2], 16);
    var b = parseInt(result[3], 16);
    return 'RGB('+r+','+g+','+b+')'; 
}
</script>
</div>
5. Done.

So many articles on  How to Make Color Picker Tools on Blogger Static Pages. Good luck.