The next example shows how Flex uses the Swatchgridbackgroundcolor style to set the color of the colorpicker Swatch color grid background.
Here is the complete code
<?xml version= "1.0" encoding= "Utf-8"?>
<mx:applicationxmlns:mx= "Http://www.adobe.com/2006/mxml"
layout= "Vertical"
verticalalign= "Top"
Backgroundcolor= "White"
Creationcomplete= "Init ();" >
<mx:Style>
. mycustomswatchpanelstylename {
* Border * *
Swatchbordercolor:white;
Swatchbordersize:1;
* Highlight * *
Swatchhighlightcolor:black;
Swatchhighlightsize:2;
* Gap * *
Horizontalgap:2;
Verticalgap:2;
* Background * *
swatchgridbackgroundcolor:red;
}
</mx:Style>
<mx:Form>
<mx:formitemlabel= "Default:" >
<mx:ColorPicker/>
</mx:FormItem>
<mx:formitemlabel= "HORIZONTALGAP/VERTICALGAP = 2:" >
<mx:colorpickerid= "ColorPicker"
Swatchpanelstylename= "Mycustomswatchpanelstylename"/>
</mx:FormItem>
</mx:Form>
</mx:Application>