
For my next project, I needed some lightweight color picker that would be usable but not boring. Nice challenge. So I have created ColorCircle class that may work as a color picker while it dispatches all the necessary ColorCircleEvent-s. I made this class a little dynamic, so you can create custom color pickers on runtime using RGB palette, Black to White fade, solid color or current color with any defined radius (inner + outer) you want.
To create donut shapes I have used shape with lineStyle+drawCircle+cacheAsBitmap drawed over original graphics using BlendMode.ALPHA. To browse RGB pelette there is a paletteColor() method that crawls all color spectrum based on position (0 to 1).
Read the rest of this entry »
There are multiple libraries that lets you adjust contrast, brightness, hue, saturation. Lets have look at some:
fl.motion.AdjustColor class is a part of Flash CS4:
import flash.filters.ColorMatrixFilter;
import fl.motion.AdjustColor;
// AdjustColor class location:
// Adobe Flash CS4/Common/Configuration/ActionScript 3.0/projects/Flash/src/fl/motion/AdjustColor.as
var color:AdjustColor = new AdjustColor();
color.brightness = brightness;
color.contrast = contrast;
color.hue = 0;
color. saturation = 0;
image.filters = [new ColorMatrixFilter(color.CalculateFinalFlatArray())];
Read the rest of this entry »