> 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="https://2668731230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fknvt0jlDBXmk91mWaWXB%2Fuploads%2FDqHI5GCHEsDZzlxf8djn%2FPosterization_1.png?alt=media&amp;token=2b66669d-3a80-4934-9f26-993517344bf9" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
