« Flash and Java: Silver and Gold? | Main | Monday's Poster #8 »

Accessible color in flash

While researching for a presentation on communicating science and math online, I started thinking about color and accessibility. Science and math are highly visual and color is an essential part of scientific communication. Something as simple as a liquid changing color, indicates that a chemical reaction has run it's course. In science illustration, color is used to highlight aspects in a complex diagram or to indicate difference between two very similar structures.

But when designing to accommodate an audience that includes people with some degree of color-blindness, the use of color gets a little complicated. I've been toying with the idea of an accessibility "style sheet" for color in Flash--to use dynamic definitions of color for all elements in a swf file. It's good practice to define your colors dynamically, but a little extra effort could greatly increase usability of color.

Some pseudo code:

// create object to hold color values
colorStyles = new Object();
colorStyles.blue1 = 0x0000FF;
colorStyles.red1 = 0xFF0000;
colorStyles.green1 = 0x00FF00;

//assign color to an element in the animation:
ball.color = colorStyles.blue1;

If the end-user has red-green color blindness, then they could use an alternate color style that would highlight elements with color, in a meaningful way. An alternate color-style could be used to redefine all colors defined in the original color-style.

This is fine, in theory, but how would we implement the color style with user control? Is anyone out there working on this?


I haven't been busy, but Robert Penner certainly has ... download his 'color_toolkit.as' for just about every color-centric function you could possibly conjure, discussed in chapter 9 of his book, ProfMX:


Also, there is a 'ColorSchemer' tool (not Flash) to download or play with online, which dynamically displays complimentary color schemes: