Hex color is automatically converts into rgb. Why?

Viewed 63

I have a paragraph. I want to provide the color (in hexadecimal) dynamically using js.

HTML CODE:

<p id="ta">this is a para</p>

JS:

window.addEventListener('load', fnc);
function fnc() {
    var ta = document.querySelector('#ta');
    ta.style.color = "#100000";
}

It automatically converts into rgb form.

enter image description here

Why it automatically converts into rgb?

0 Answers
Related