static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Thu, 01 May 2014 23:55:53 +0300
changeset 85 ee05d89bde77
parent 83 136e210fce82
permissions -rw-r--r--
dmx-web: ajax updates
$.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 + ')');
    },
});