---
title: "ColorAdjustmentProvider..::.AutoLevels Method (Double)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_ColorAdjustmentProvider_AutoLevels_1_68764a97.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# ColorAdjustmentProvider.AutoLevels Method (Double)
 
Automatically applies levels adjustment using a provided threshold level.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub AutoLevels ( _threshold As Double _
)
```
 
```csharp
public void AutoLevels(double threshold
)
```
 
### Parameters
 
 - threshold
     - Type: [System.Double](http://msdn2.microsoft.com/en-us/643eft0t)
 
Threshold level of the automatic level correction algorithm (sensitivity).
 
The threshold value is used to define a percent of pixels on edges of the tonal range to discard. Threshold = 1 is 100% of pixels. To get more or less realistic result, use a value less than 1% (0.01). For example:
 
- If you want to get a result similar to Photoshop® 7, use 0.5% (0.005).
- If you want a result similar to Photoshop CS or later, use 0.1% (0.001).
 
## Remarks
  
You can also use [Levels](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Levels.htm.md) class to apply this correction (with [Auto](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Levels_Auto.htm.md) property set to **true**).
   
## See Also

### Reference

- [ColorAdjustmentProvider Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ColorAdjustmentProvider.htm.md)
- [AutoLevels Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_ColorAdjustmentProvider_AutoLevels.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
