Flash: Blend Modes and Optimal Contrast

by troy on March 10, 2008

Got some chance to play with blend modes this weekend...cool stuff. While the example is neat looking, In particular was looking for a solution to (dynamically) contrasting against an unknown background, as is likely to happen with developing tools with unknown content, else whatever you pick will break.. This is easy to see on my TV programs, where the 'bug' has to show up against an rapidly changing background of. Say showing white text against a dark background and a light text against a dark, versus the normal technique of white text with a dark blur around it, to always have an moat of safety around it.

Flash blend modes exploration on high contrast backgrounds
(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

What you're seeing is a 3 line text with:

Snow (white and black)
Snow (50% gray, 50% gray 50% transparent)
Snow (black and white)

Repeated a bunch of times, in a clip with the blend mode listed at the top.

Unfortunately in the gray zone most techniques just fail. Helped me realize what's really desired is some intelligence as to what is beneath the image to pick a suitable offset, say at when 50% gray, just choosing white or black based on the dominate color of the page. Leading to the only way to get high contrast between menu items is the halo..which I suppose is more consistent from a usability, if less integrated with the image.

Kaourantin the implementer of these in the flash player has great information on how they behave, and the impact on performance. As mentioned here To use Alpha and erase blend modes you have to do extra work: 1) put them in a parent movie clip, and turn that parent's movieclip blend mode to 'layer', else they don't show up at all.

Contrast this approach with the use of ColorUtils and Adaptive Color

Leave a Comment

Previous post:

Next post: