Tag Archive for 'selectedcolor'

24
Aug

Adjusting a color’s brightness using the ColorUtil class

Here’s a handy little trick, compliments of the ColorUtil class. The ColorUtil class has a couple useful methods if you ever need to change a color’s brightness using either a linear brightness adjustment (ColorUtil.adjustBrightness()) or a scaled brightness adjustment (ColorUtil.adjustBrightness2()). Mind you, I have no idea what that linear brightness versus scaled brightness actually means, so I’ll show both methods side-by-side.

Full code after the jump.

Continue reading ‘Adjusting a color’s brightness using the ColorUtil class’

31
Jul

Using the ColorPicker control’s colorField and labelField properties

In a previous post, “Formatting colors as strings with ActionScript“, A reader asked about the ColorPicker component. So here’s a quick little example of creating a ColorPicker control, as well as setting the labelField and colorField properties to display color names in the ColorPicker control.

Continue reading ‘Using the ColorPicker control’s colorField and labelField properties’