RasterImage.ReplaceColor

ReplaceColor(Color, byte, Color)

Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.

public void ReplaceColor(Color oldColor, byte oldColorDiff, Color newColor)
ParameterTypeDescription
oldColorColorOld color to be replaced.
oldColorDiffByteAllowed difference in old color to be able to widen replaced color tone.
newColorColorNew color to replace old color with.

See Also


ReplaceColor(int, byte, int)

Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.

public virtual void ReplaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)
ParameterTypeDescription
oldColorArgbInt32Old color ARGB value to be replaced.
oldColorDiffByteAllowed difference in old color to be able to widen replaced color tone.
newColorArgbInt32New color ARGB value to replace old color with.

See Also