Skip to content

Instantly share code, notes, and snippets.

@cyrusdavid
Last active August 29, 2015 14:05
Show Gist options
  • Save cyrusdavid/0b0eddeb7c2fddf8fb0a to your computer and use it in GitHub Desktop.
Save cyrusdavid/0b0eddeb7c2fddf8fb0a to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
</body>
<textarea id="make-color-demo"></textarea> <button id="make">Please</button>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://www.checkman.io/please/js/Please-compressed.js"></script>
<script src="script.js"></script>
</body>
</html>
var div = $('#make-color-demo');
var btn = $('#make');
function please() {
var bg = Please.make_color({
hex: true,
golden: true,
full_random: true
});
div.css('background', bg);
div.html(bg);
div.select();
}
$(document).on('click', '#make', function() {
please();
});
please();
#make-color-demo {
height: 100px;
text-align: center;
line-height: 100px;
}
#make {
cursor: pointer;
}
#make-color-demo, #make {
width: 400px;
display: block;
margin-left: auto;
margin-right: auto;
}
::selection {
background: rgba(0,0,0,.2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment