{{< psd/tize >}}
## ReplaceColor(Color, byte, Color) {#replacecolor}

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

```csharp
public void ReplaceColor(Color oldColor, byte oldColorDiff, Color newColor)
```

| Parameter | Type | Description |
| --- | --- | --- |
| oldColor | Color | Old color to be replaced. |
| oldColorDiff | Byte | Allowed difference in old color to be able to widen replaced color tone. |
| newColor | Color | New color to replace old color with. |

### See Also

* struct [Color](../../color/)
* class [RasterImage](../)
* namespace [Aspose.PSD](../../../aspose.psd/)
* assembly [Aspose.PSD](../../../)

---

## ReplaceColor(int, byte, int) {#replacecolor_1}

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

```csharp
public virtual void ReplaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)
```

| Parameter | Type | Description |
| --- | --- | --- |
| oldColorArgb | Int32 | Old color ARGB value to be replaced. |
| oldColorDiff | Byte | Allowed difference in old color to be able to widen replaced color tone. |
| newColorArgb | Int32 | New color ARGB value to replace old color with. |

### See Also

* class [RasterImage](../)
* namespace [Aspose.PSD](../../../aspose.psd/)
* assembly [Aspose.PSD](../../../)


