I want to change every color and background-color property which are rgb(22, 160, 133)
, #16a085
, #16a085 !important
, #16a085!important
. However, I couldn't it.
I want to give a real example:
http://www.hekim.deniz-tasarim.site/
On header, there are 4 example sentence.I didnt write example code for background-color property yet, they are for only color property.
My js code:
jQuery(document).ready(function(){
});
function CommentStyle2() {
alert("1Hello! I am an alert box!!");
document.querySelectorAll('*').forEach(function(node) {
let cara = window.getComputedStyle(node);
let lara = cara.getPropertyValue('color');
if (lara === 'rgb(22, 160, 134)')
alert(lara);
lara = 'blue';
});
}
window.onload = CommentStyle2;
I said it before, I write 4 example text which have the color propery so When refresh the website, it gives 4 alert message but the color doesnt change to blue.
Why? How can I solve it?
I give the html code for the example text on header:
<style>
.rgb-h2-class{
color:rgb(22, 160, 134);
}
.sharp-color-class{
color:#16a086;
}
</style>
<h1 style="color:rgb(22, 160, 134);">h1 text which has color:rgb(22, 160, 134)</h1>
<h2 class="rgb-h2-class">h2 text which has rgb-h2-class</h2>
<h1 style="color:#16a086;">h1 text which has color:#16a086;</h1>
<h2 class="sharp-color-class">h2 text which has sharp-color-class</h2>