static/color-slider.js
author Tero Marttila <terom@paivola.fi>
Fri, 30 Jan 2015 01:28:51 +0200
changeset 108 e77b7c324a32
parent 83 136e210fce82
permissions -rw-r--r--
qmsk.web.json
$.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 + ')');
    },
});