<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Panel x="128" y="58" width="472" height="284" layout="absolute"> <mx:ColorPicker x="59" y="19" id="cp"/> <mx:VBox x="59" y="73" height="46" width="301" backgroundColor="{cp.selectedColor}" borderColor="#B7BABC"> </mx:VBox> <mx:Label width="301" height="44" text="{cp.selectedColor.toString(16)}" x="59" y="146"/> </mx:Panel> </mx:Application>简单的例子,复制代码查看效果