Skip to content

Instantly share code, notes, and snippets.

Aneudy Abreu aneudy1702

  • 620 8th ave, New York, NY 10018
Block or report user

Report or block aneudy1702

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rmwxiong
rmwxiong / gist:ad6e922dcc739a599640
Last active Aug 1, 2019 — forked from paulirish/gist:357048
Fix for color components with single digit values
View gist:ad6e922dcc739a599640
// get the average color of two hex colors.
function avgcolor(color1,color2){
var avg = function(a,b){ return (a+b)/2; },
t16 = function(c){ return parseInt((''+c).replace('#',''),16) },
hex = function(c){ var t = (c>>0).toString(16);
return t.length == 2 ? t : '0' + t },
hex1 = t16(color1),
hex2 = t16(color2),
r = function(hex){ return hex >> 16 & 0xFF},
g = function(hex){ return hex >> 8 & 0xFF},
View README
Code
$("button").single_double_click(function () {
alert("Try double-clicking me!")
}, function () {
alert("Double click detected, I'm hiding")
$(this).hide()
})
You can’t perform that action at this time.