JSAPI.info

dojo.blendColors

Dojo (1.6.1) - see full source
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
){
    // summary:
    //        Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend,
    //        can reuse a previously allocated dojo.Color object for the result
    var t = obj || new d.Color();
    d.forEach(["r", "g", "b", "a"], function(x){
        t[x] = start[x] + (end[x] - start[x]) * weight;
        if(x != "a"){ t[x] = Math.round(t[x]); }
    });
    return t.sanitize();    // dojo.Color
};