Created
July 24, 2015 09:04
-
-
Save gidili/84fda0eb5258d08cf614 to your computer and use it in GitHub Desktop.
apply theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rgb2hex(rgb) { | |
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); | |
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); | |
} | |
function hex(x) { | |
return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16]; | |
} | |
var hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"); | |
$("*").each(function(){ | |
if(rgb2hex($(this).css("color")) == "#fc6320") | |
$(this).css("color","#D6F729"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment