I have a solution based on Mick's suggestion and performing some more
searches. Here's the function if anyone else is looking for the same
thing:
Public Function ChangeImageColor(ByVal image As
System.Drawing.Image, ByVal oldColor As System.Drawing.Color, ByVal
newColor As System.Drawing.Color) As System.Drawing.Image
Dim newImage As System.Drawing.Image = DirectCast(image.Clone,
System.Drawing.Image)
Dim g1 As System.Drawing.Graphics =
System.Drawing.Graphics.FromImage(newImage)
' Create a color map.
Dim colorMap(0) As System.Drawing.Imaging.ColorMap
colorMap(0) = New System.Drawing.imaging.ColorMap
colorMap(0).OldColor = oldColor
colorMap(0).NewColor = newColor
' Create an ImageAttributes object, and then pass the
transformerobject to the SetRemapTable method.
Dim imageAttr As System.Drawing.Imaging.ImageAttributes = New
System.Drawing.Imaging.ImageAttributes
imageAttr.SetRemapTable(colorMap)
g1.DrawImage(newImage, New System.Drawing.Rectangle(0, 0,
newImage.Width, newImage.Height), 0, 0, newImage.Width,
newImage.Height, Drawing.GraphicsUnit.Pixel, imageAttr)
Return newImage
End Function