---
title: "ColorAdjustmentProvider..::.Levels Method (Single, Single, Single, Single, Single, HistogramMode)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_ColorAdjustmentProvider_Levels_6_2fbf0260.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.Levels Method (Single, Single, Single, Single, Single, HistogramMode)
 
Applies tone levels correction (the same as Adobe® Photoshop® Levels effect).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub Levels ( _minimumLevel As Single, _maximumLevel As Single, _shadows As Single, _midtones As Single, _highlights As Single, _histogramMode As HistogramMode _
)
```
 
```csharp
public void Levels(float minimumLevel,float maximumLevel,float shadows,float midtones,float highlights,HistogramMode histogramMode
)
```
 
### Parameters
 
 - minimumLevel
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0, 1] that specifies minimum output level value.

 - maximumLevel
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0, 1] that specifies maximum output level value.

 - shadows
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0, 1] that specifies minimum input shadows level.

 - midtones
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0.1, 10] that specifies input midtones level.

 - highlights
     - Type: [System.Single](http://msdn2.microsoft.com/en-us/3www918f)
Value in range [0, 1] that specifies maximum input highlights level.

 - histogramMode
     - Type: [Aurigma.GraphicsMill.HistogramMode](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_HistogramMode.htm.md)
 [HistogramMode](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_HistogramMode.htm.md) value that specifies how to build histogram.
 
## Remarks
  
All parameters that specify tone range (*minimumLevel*, *maximumLevel*, *shadows*, and *histogram*) are normalized to 1. Depending on pixel format they are scaled to 255 or 65355 inside of the method.
 
## Examples
  
```
bitmap.ColorAdjustment.Levels(0.03F, 0.9F, 0.05F, 1.5F, 0.7F, Aurigma.GraphicsMill.HistogramMode.Sum)
```
 
```csharp
bitmap.ColorAdjustment.Levels(0.03F, 0.9F, 0.05F, 1.5F, 0.7F, Aurigma.GraphicsMill.HistogramMode.Sum);
```
   
## See Also

### Reference

- [ColorAdjustmentProvider Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ColorAdjustmentProvider.htm.md)
- [Levels Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_ColorAdjustmentProvider_Levels.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
