Internet Explorer 6 is not supported.
Upgrade to view this site.

Blog Archive

Results for the blog tag transformations.

Colors and Numbers

There are 2 classes that deal with color. There is the appropriately named Color class and the ColorTransform class. Color is a subclass of the ColorTransform class. The Color class adds a few more features to the ColorTransform class such as control over brightness and tint.

A new instance of the ColorTransform accepts a lot of parameters. There is redMultiplier, redOffset, greenMultiplier, greenOffset, blueMultiplier, blueOffset, alphaMultiplier and alphaOffset. Personally, I find these values very counterintuitive. Give me good old HSB any day. All these crazy, meaningless numbers are additive, which means they are appended to the target’s current color value. If you have an exact color value in mind you can circumvent trying to figure out how to use all this stuff with the color property. The color property can be used with the Color class and the ColorTransform class. Below are simple examples of the usage of this. Read more …