Use a ColorPicker to Set Canvas Color
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Canvas id="cnv" width="450" height="450" backgroundColor="#eeaeaea">
<mx:ColorPicker id="pckr" right="10" top="10" change="setColor(event)"/>
</mx:Canvas>
<mx:Script>
import mx.events.ColorPickerEvent;
private function setColor(evt:ColorPickerEvent):void{
cnv.setStyle("backgroundColor",evt.color);
}
</mx:Script>
</mx:Application>
Related examples in the same category