static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Thu, 29 Jan 2015 22:15:38 +0200
changeset 103 5263f65c990e
parent 83 136e210fce82
permissions -rw-r--r--
qmsk.web.application: split lookup/respond
$.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 + ')');
    },
});