---
title: "Desaturate"
canonical: https://www.graphicsmill.com/samples/Transforms/ColorAdjustment/Desaturate_cs
product: "Graphics Mill"
source: "Transforms/ColorAdjustment/Desaturate.cs"
---

# Desaturate

Desaturates image.

## Instruction

Desaturate the colors of an image (convert to grayscale) using the `Desaturate` method.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.ColorAdjustment.Desaturate();

    bitmap.Save("Desaturate.jpg");
}
```

## Explanation

The code:

- Applies the desaturation to the image, removing its color, effectively converting it to grayscale.
- The resulting image is saved to a file.

## 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

- [Desaturate.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Desaturate_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.ColorAdjustment](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_ColorAdjustment.htm.md>)
- [Aurigma.GraphicsMill.ColorAdjustmentProvider.Desaturate](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ColorAdjustmentProvider_Desaturate.htm.md>)
