87407607 2013-08-20
代码如下:
$.fn.getHexBackgroundColor = function() { var rgb = $(this).css('background-color'); if(!$.browser.msie){ rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); } rgb= "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); } return rgb; }
<?php. $rgb = imagecolorat($i,$x,$y);$r=($rgb >>16) & 0xFF;$g=($rgb >> & 0xFF;$b=$rgb & 0xFF;$rTotal