I'm trying to optimize a script that targets multiple rgb color styles. It looks like this:
var divs = document.querySelectorAll('div[style^="color"]');
[].forEach.call(divs, function(div) {
if(div.style.color.includes('rgb(215, 218, 220)')){
div.style.color="rgb(23, 23, 24)";
}
});
I'd like to do the same thing which is done for target style rgb(215, 218, 220), for 255, 69, 0 and 113, 147, 255. How would that be accomplished most simply and efficiently?
rgb(215, 218, 220), also for255, 69, 0 and 113, 147, 255them ?23, 23, 24.