Broiler Demo Rainbow

This is a small demo that shows how broilerjs is picking a color from an image by click. This example is a little bit different from the demos in the repository on Github, cause it is loaded with RequireJS to ensure it does not conflict with other jQuery versions on my blog. Just click a color in the rainbow image.

$(function() {
    $("#rainbow").broiler(function(color) {
        var hex = "#" + ((1 << 24) + (color.r << 16) + (color.g << 8) + color.b).toString(16).slice(1);
        $("#panel").css("background-color", hex);
Next Previous