Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to compare hexadecimal color values in WeChat applet programming
How to compare hexadecimal color values in WeChat applet programming
Wechat applet is based on JavaScript, so your question can actually be translated into "How does JavaScript compare hexadecimal color values".

For details, please refer to the online tutorial: RGB and hexadecimal conversion of color values.

The hexadecimal comparison size of JavaScript gives a simple code.

& lt! DOCTYPE? html & gt

& lthtml & gt

& lthead & gt

& ltmeta? charset="UTF-8 " >

& lttitle & gt insert? Title? Here & lt/title & gt;;

& lt/head & gt;

& ltbody & gt

& lt/body & gt;

& lt script? type = " text/JavaScript " & gt;

if(0xff? & gt? 0xdd){

alert("0xff? & gt? 0xdd? Is it? True ");

alert(parse int(" 0x ff ")); //hexadecimal to decimal

alert(parse int(" 0x DD "));

}

if(0xff? & lt? 0xdd){

alert("0xff? & lt? 0xdd? Is it? True ");

}

& lt/script & gt;

& lt/html & gt;