Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

iscolor

function isColor(color){
       document.writeln(`<p id="mhm" style="display: none; color: `+color+`;">hi</p>`);
       if(document.getElementById("mhm").style.color == color){
          console.log("valid color")
          return true
       }else{
          console.log("invalid color")
          return false
    }
}
//checks for rgb, hex, and normal colors
 
PREVIOUS NEXT
Tagged: #iscolor
ADD COMMENT
Topic
Name
7+9 =