how to overlay text colour and image colour to create overlay combined colour

When combining a text overpay on an existing image in .net c# with graphic.draw method
how do you add text on top of the image that when the text overlaps the image it creates a font colour
which is a combination colour of the underlaying image and the font colour

so if image was black and text on top was white the overlaying area of text on top of image would be grey!

thanks for your help
stephenwildeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
Create a SolidBrush that has transparency and use it as the Brush in you draw:
Dim myBrush As SolidBrush = New SolidBrush(Color.FromArgb(200, Color.White))
e.Graphics.FillRectangle(Brushes.Black, New Rectangle(20, 20, 20, 20))
e.Graphics.DrawString("Test", New Font("Arial", 20, FontStyle.Bold), myBrush, New Point(10, 10))

Open in new window

The first parameter of FromArgb controls the transparency. It can be a value between 0 and 250. 0 is completely transparent, 255 is completely opaque.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stephenwildeAuthor Commented:
Thank you for the solution, code and explanation.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.