How do I write a RGB color value in JavaScript?

前端 未结 6 1532
不知归路
不知归路 2020-12-28 13:09

I am trying to change the color of the function swapFE() below and I can\'t figure out how to write it. I was told to change the color of the phrase node to the color value

6条回答
  •  囚心锁ツ
    2020-12-28 13:31

    try:

    parent.childNodes[1].style.color = "rgb(155, 102, 102)"; 
    

    Or

    parent.childNodes[1].style.color = "#"+(155).toString(16)+(102).toString(16)+(102).toString(16);
    

提交回复
热议问题