Added in methods to generate the hex code when a user clicks on one of the outputted boxes
This commit is contained in:
parent
cdc4218e3a
commit
e19f1c475c
2 changed files with 18 additions and 1 deletions
|
|
@ -75,6 +75,11 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
$(".color_boxd").live("click", function() {
|
||||
// It's 4AM, and I'm tired. I'm not building a damn regular expression, so yeah, we'll multiple .replace() ;P
|
||||
alert("This hex color: " + franz.RGBtoHex($(this)[0].style.backgroundColor.replace(")", "").replace("rgb(", "").replace(" ", "").split(",")));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
Reference in a new issue