OCR Image Color Editing OCR works faster and more accurately when we read black text on a white background. If we have, for example, blue text on a pink background, we will want to swap blue to black and pink to white before performing OCR. This can be very time-consuming and slow using System.Drawing, but it is completely automated with IronOCR. The OcrInput.ReplaceColor method allows us to replace one color with another in a document. This method is adaptive, allowing you to specify a percentage tolerance for a match to an exact RGB color. This removes the need to use Photoshop or ImageMagick scripts to prepare images for OCR. ReplaceColor Method Parameters The first parameter is the color to be replaced. The second parameter is the replacement color. The third optional parameter specifies tolerance for how closely the colors must match which allows for variations within the specified percentage. Learn More About Image Color Correction in OCR Related Docs Links View on Github Related Tutorial Related How-To Guide Class Documentation OCR Language Packs Download IronOCR DLL Report an Issue on this page Ready to Get Started? Nuget Downloads 5,041,124 | Version: 2025.11 just released Free NuGet Download Total downloads: 5,041,124 View Licenses