Is there any way to get a color picker which modified the alpha channel of a RGBA color using dat.gui ( http://code.google.com/p/dat-gui/ )?
Currently I'm only able to change the RGB value using the color picker - even though the color picker accepts an alpha value.
Example (also available http://jsfiddle.net/mortennobel/PT3g2/1/ ):
var ColorObject = function() {
this.color = [ 0, 128, 255, 0.3 ]; // RGB with alpha
this.showAlert = function(){
alert("Color is "+this.color);
}
};
var colorObject = new ColorObject();
var gui = new dat.GUI();
gui.addColor(colorObject, 'color');
gui.add(colorObject, 'showAlert');