http://qs321.pair.com?node_id=261566


in reply to Contrasting Colours

Inverting the RGB value (i.e. subtracting each color value from the maximum value) would give a quick-and-dirty contrasting color.

There is also a module Color::Calc that supplies contrast, mix and blend functions.