static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Thu, 01 May 2014 23:34:20 +0300
changeset 83 136e210fce82
parent 81 6f1e9a5ac874
permissions -rw-r--r--
qmsk.dmx: new Head-based model/view; output/updates not yet implemented
$.fn.extend({
    /*
     * Set background to solid color
     */
    background_color: function (r, g, b, a) {
        if (a == undefined)
            a = 1.0;

        this.css('background', 'rgba(' + (r * 255) + ', ' + (g * 255) + ', ' + (b * 255) + ', ' + a + ')');
    },
});