> For the complete documentation index, see [llms.txt](https://docs.cloudimage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudimage.io/transformations/image-filters/colorize/duotone.md).

# Duotone

Create a duotone effect by using **duotone=C1,C2\[,Y]**, where **C1** and **C2** are the colors for the duotone (hex value or color name) and **Y** is the opacity (`Y=0..1`, default`1`).

<mark style="color:green;">**duotone=C1,C2\[,Y]**</mark>

| Preview                                                             | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="/files/oBUnpas6V5ga9IQF7LB8" alt="" data-size="original"> | <p>Original image:</p><p><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/mountains.jpg?w=400">/samples.scaleflex.com/mountains.jpg?<mark style="color:orange;"><strong>w=400</strong></mark></a></p>                                                                                                                                                                                                                |
| <img src="/files/hmsiJbBRr7FpfDoFwCOx" alt="" data-size="original"> | <p>By default, the image is desaturated first:</p><p><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/mountains.jpg?w=400&#x26;duotone=000080,ffff00">/samples.scaleflex.com/mountains.jpg?<mark style="color:orange;"><strong>w=400</strong></mark>&<mark style="color:green;"><strong>duotone=000080,ffff00</strong></mark></a></p>                                                                                |
| <img src="/files/3Pfvor7rfAb3PIjmZVQs" alt="" data-size="original"> | <p>If you prefer, you can convert to grayscale instead:</p><p><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/mountains.jpg?w=400&#x26;duotone=000080,ffff00&#x26;gray=1">/samples.scaleflex.com/mountains.jpg?<mark style="color:orange;"><strong>w=400</strong></mark>&<mark style="color:green;"><strong>duotone=000080,ffff00</strong></mark>&<mark style="color:green;"><strong>gray=1</strong></mark></a></p> |
| <img src="/files/8BvNqkIhQm0x3RmVeMne" alt="" data-size="original"> | <p>60% opacity (0.6) of the filter:</p><p><a href="https://doc.cloudimg.io/https://samples.scaleflex.com/mountains.jpg?w=400&#x26;duotone=000080,ffff00,0.6">/samples.scaleflex.com/mountains.jpg?<mark style="color:orange;"><strong>w=400</strong></mark>&<mark style="color:green;"><strong>duotone=000080,ffff00,0.6</strong></mark></a></p>                                                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.cloudimage.io/transformations/image-filters/colorize/duotone.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.
