You're replacing the colour of a "shaded" image with a flat selected colour from a ColorDialog
. So basically, you're replacing every pixel, regardless of ARGB, with a single ARGB from the dialog, thus completely overwriting any existing image information. You may as well just draw the image from scratch based on the old image's dimensions, without concern for the original image since it's being completely rewritten.
It sounds like what you are probably intending to do is blend the 2 colours together (the original image + the new colour). There are literally hundreds of ways to do this. One that comes to mind is to create an overlay with 50% transparency and apply it over the original image. You could also set the ARGB to an average:
int a = (BackColor.A + p.A) / 2;
int r = (BackColor.R + p.R) / 2;
int g = (BackColor.G + p.G) / 2;
int b = (BackColor.B + p.B) / 2;
This will give you a feel for how to consider the original colours while changing them versus flat out replacing them.