tags:

views:

33

answers:

0

I have a list of colors in hex format. I then call System.Drawing.ColorTranslator.FromHtml("#ff0000") to get a color object in C# that I then draw on a white background.

I draw many shapes and I'd like to visually be able to tell if they are overlapping using alpha transparency. So if I draw a yellow and a red square that partially overlap, the overlapping part is orange. I just change the Color.A attribute to say 128 for 50% transparency. Simple enough.

The problem is that in using alpha transparency the color of the shape gets lightened when drawn on the white background. Is there a way to convert a color to a darker shade and then draw it with a certain alpha level so that when drawn on a white background it looks like the intended color?