---
title: "ContiguousBackgroundRemoval Constructor (Color, Single)"
canonical: https://www.graphicsmill.com/docs/gm/C_Aurigma_GraphicsMill_Transforms_ContiguousBackgroundRemoval_ctor_2_06afafae.htm
product: "Graphics Mill"
---

# ContiguousBackgroundRemoval Constructor (Color, Single)
 
Initializes a new instance of the [ContiguousBackgroundRemoval](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_ContiguousBackgroundRemoval.htm.md) class with the specified background color and tolerance.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public ContiguousBackgroundRemoval(Color backgroundColor,float tolerance
)
```
 
### Parameters
 
 - backgroundColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Color.htm.md)
The color of the background, or `null` to use the median color of the image border.

 - tolerance
     - Type: System.Single
The largest color difference (delta E) between a background pixel and the background color, in range `[0, 200]`.
 
## Exceptions
  
|  Exception |  Condition |
| --- | --- |
 |  System.ArgumentException |  The color is a spot or an indexed color. |
 |  System.ArgumentOutOfRangeException |  The tolerance is out of range. |
   
## See Also

### Reference

- [ContiguousBackgroundRemoval Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_ContiguousBackgroundRemoval.htm.md)
- [ContiguousBackgroundRemoval Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Transforms_ContiguousBackgroundRemoval_ctor.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
