static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Thu, 30 Jul 2015 02:45:08 +0300
changeset 116 8d42dba32bb7
parent 83 136e210fce82
permissions -rw-r--r--
fixup namespace package for python3.3 style implict namespace package directories
$.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 + ')');
    },
});