> For the complete documentation index, see [llms.txt](https://community.threekit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.threekit.com/platform-documentation/project-data/operators/image-operators/posterization.md).

# Posterization

### Plugs

* Image
* Vector

### Role

Recolor an image or vector by mapping each color to the closest color listed in the `Colors` property.\
The distance can be computed in two color spaces; `RGB` or `HSL`.\
In case of equidistance between two or more colors, the first one found it the one assigned.

### Properties

* **Colors**: List of color listed either by CSS color code or color name
  * ex.: `purple, #ff0000, #abcd56, black`
* **Color Space**: `RGB` or `HSL` space

### Limitations

* An SVG with a gradient only maps the limit of the gradient and not the intermediate colors.
  * The work around for this is to create a canvas and use the vector node in a canvas composite then add the `posterization` operator.
* An embedded image in an SVG file won't be recolored.
  * The same work around using a canvas composite works in this case

**Posterization** has been added as an operator for images. Now you can recolor images in real-time to a predefined list of colors. For example, if a Customer only prints 20 set colors or in black and white, Threekit can automatically recolor image uploads to those 20 colors in the configurator. Threekit can also export the recolored images for post-order workflows.\
Head over to a Texture asset and add the Posterization Operator. Then you can add a list of colors using HEX code or HTML color names<br>

<figure><img src="/files/NOckicJ5fYTQUnNJTUBJ" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://community.threekit.com/platform-documentation/project-data/operators/image-operators/posterization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
