rgb转16进制 简单实现

function rgbToHex(r, g, b) { return ((r << 16) | (g << 8) | b).toString(16); } 

  

原文地址:https://www.cnblogs.com/w2xh/p/5381603.html