static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Sat, 07 Jun 2014 16:23:16 +0300
changeset 96 e6dfc98ec50f
parent 83 136e210fce82
permissions -rw-r--r--
qmsk.dmx.web: port to qmsk.web, python3
$.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 + ')');
    },
});