# Convert to Gray

**Convert to Gray (Mean)**\
This will convert a color image into a gray scale image by computing the mean values of the red, green and blue values for each pixel.

**Convert to Gray (Luminance)**\
This will convert a color image into a gray scale image by creating converting the RGB image into an HSL image and then extracting the L (luminance) channel.

**Smart Decolor**\
This is a very advanced function that converts a color image into a gray scale image while preserving the image contrast. This can produce visually appealing black and white images. Also, it can help when printing a color image with a monochrome printer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astra-image.gitbook.io/astra-image-6.0/processing-tools/convert-to-gray.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
