Andy Hulstkamp

about creating online experiences

10. April 2010

Flex 4 - change baseColor to chromeColor and useChromeColor=true

While updating the Gumbo-Components on this blog to flex 4 final I noticed that the style-property baseColor has been changed to chromeColor.

In addition to this the flag useChromeColor can be set to tell the SparkSkin to use chromeColor for colorization. For custom skins this can be set by overriding initializationComplete() in the skin.

override protected function initializationComplete():void  {

    useChromeColor = true;
    super.initializationComplete();
}

Internally Flex checks this flag in updateDisplayList() of a SparkSkin and uses the value in chromeColor for colorization (respecting exclusions in get colorizeExclusions()).

If you are using Gumbo-Components from this blog that use baseColor be sure to make these adjustments.

further reading

Customize the Spark TextInput Component in Flex 4 (Gumbo). Adding focus and Transitions.

A custom Flex Spark Text-Input.

Flex 4 custom Knob Button - Part 2

Custom Component in Flex 4. Second Part in creating an Knob Button with custom LAF.