by Klas Jersevi

Color channel colorizer Pixel Bender filter for Flash and Photoshop

I had an idea for a (probably) very cool graphic effect for Flash using colorized dots. My intention was to make it so it could be used for images, animations, videos or whatever. To do this effect I realized that I needed a way to change colors of the graphics in an easy and precise way. Since I’ve worked a lot with the Pixel Bender Toolkit lately, it came natural to make a pixel bender filter for this task.

Channel Color Conversion
The filter is made to change each original RGB channel of an image into a different color, defined by the user. The filter also has support for the transparency in the alpha channel (RGBA format). However, it is a rather abstract thing to understand the effects of changing the transparency in to color or vice versa, so I will leave it for you to experiment with if you really need it.

The above image is filtered using the color transformation in the diagram. You can see how the colors differ from the original image to the right.

The filter can be used with two settings, balanced or unbalanced. The default setting is unbalanced which sets the channels to the specific colors exactly. This causes the the colors to go outside the boundaries of the RGB color space when the colors get to intense. The effect is that the colors get cut off at a specific point, when they can’t get anymore intense. The balanced setting corrects this and normalizes the color so that all details gets preserved and nothing is cutoff. This sounds good right? Well, the negative effect is that the colors no longer is the exact colors you specified and sometimes the colors get very dull or desaturated. The filter is now updated and the colors are now correct all the time.

Here is an example of the two sides of the balancing with an rather extreme color setting. The picture on the left shows the original image. The picture in the middle has an unbalanced color setting. Here you can see that the image matches the colors but some intense colors in the flower gets too intense and loses detail. When turning on the balancing in the right picture, the detail comes back, but the colors no longer match the color setting. Read about the updated normalization.

RGB color conversion

The filter can be used in a lot of ways for a lot of purposes and I bet you can find more uses of it:

  • Changing each channel to a different color
  • Mapping the colors to a specific color theme or scheme
  • Changing the image to black and white (or decolorize/desaturate)
  • Changing the image to black and white with a specific color tone or tint (sepia for example)
  • Creating a color weighted black and white image
  • Colorizing an image to a specific RGB color
  • Extracting a specific color channel

The filter is primarily made for use with Flash, but works fine with Photoshop as well. To use it in Photoshop you need to install the Pixel Bender plugin for Photoshop CS4 and copy the Kernel file to the Pixel Bender folder of Photoshop. If you want to use it in Flash or Flex, Lee Brimelow has made some good tutorials on how to get started with Pixel Bender and Flash.

Creative Commons LicenseChannelColorizer by Klas Lundberg is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden.
Feel free to contact me if you want it for commercial use.

« »