---
title: "Adjust HSL"
canonical: https://www.graphicsmill.com/samples/Transforms/ColorAdjustment/AdjustHsl_cs
product: "Graphics Mill"
source: "Transforms/ColorAdjustment/AdjustHsl.cs"
---

# Adjust HSL

Adjusts HSL (Hue-Saturation-Lightness) balance.

## Instruction

Adjust the hue, saturation, and lightness (HSL) of an image.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.ColorAdjustment.AdjustHsl(0.2f, -0.1f, 0.1f);

    bitmap.Save("AdjustHsl.jpg");
}
```

## Explanation

The code:

- Adjusts the hue by 0.2f, saturation by -0.1f, and lightness by 0.1f using the `AdjustHsl` method.
- Saves the image with the HSL adjustments applied.

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Color Adjustment](<https://www.graphicsmill.com/samples/tags/color-adjustment_md>): Adjusting brightness, contrast and color

## Input

- [Chicago.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Chicago_jpg>) (preview)

## Output

- [AdjustHsl.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/AdjustHsl_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.ColorAdjustment](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_ColorAdjustment.htm.md>)
- [Aurigma.GraphicsMill.ColorAdjustmentProvider.AdjustHsl(Single,Single,Single)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ColorAdjustmentProvider_AdjustHsl_3_8ebc23ce.htm.md>)
