# Palettize Menu

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FmJNFVGhjIE9iJ5s65l6J%2Fimage.png?alt=media&#x26;token=41c9b683-211d-4f3e-b9a6-94be3ef0eb8c" alt=""><figcaption><p>"Palettize" menu</p></figcaption></figure>

## Palettize

"Palettize" has several input settings, but requires at least one layer and frame for each image. It can be found in "Help" -> "Retro Diffusion Scripts" -> "Palettize," or in "Sprite" -> "Palettize."

"Palettize" requires an active sprite canvas and the RGB color mode.

It also uses "k-means" clustering to reduce the number of colors in an image.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FnrMbDrHL5hG36Dq7Dj3T%2Fimage.png?alt=media&#x26;token=5eebbaa2-2cc6-4500-b698-aa7dfb624c22" alt=""><figcaption><p>Left: 16,980 colors | Right: 54 colors</p></figcaption></figure>

## Palette Source

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FKAnhzFLvnjJGhjMSx69C%2Fimage.png?alt=media&#x26;token=c35bee65-13d6-4aca-8074-57478fba6122" alt=""><figcaption><p>Palette source options</p></figcaption></figure>

"Palette source" lets you pick which color palette you want applied to the selected images.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FPVIg5CASLFhvUubLzhYd%2Fimage.png?alt=media&#x26;token=35628c29-1592-4f90-96df-e76d676f72a4" alt=""><figcaption><p>Baseline color image</p></figcaption></figure>

### Automatic

The "Automatic" palette source analyzes the image and selects the best number of colors to reduce it to without losing detail.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FbDr3ChzVwjEmw9U9qpYQ%2Fimage.png?alt=media&#x26;token=6bc695f0-3344-47d1-b37d-33298bb866d8" alt=""><figcaption><p>New palette chosen based on least colors while retaining quality</p></figcaption></figure>

### Best Palette

The "Best Palette" palette source looks at a folder with multiple PNG palette images and decides which palette best fits the current image based on color differences.

Available palettes in example: [nice31](https://lospec.com/palette-list/31), [blk-36](https://lospec.com/palette-list/blk-36), [commadore64](https://lospec.com/palette-list/commodore64), [fantasy24](https://lospec.com/palette-list/fantasy-24), and [vinik24](https://lospec.com/palette-list/vinik24).\
Commadore64 was chosen for its better coverage of all hues.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FnMTubP39cWuqqjflbvqz%2Fimage.png?alt=media&#x26;token=f07741ba-2cc0-446c-952e-f289bc4c114d" alt=""><figcaption><p>Commadore64 color palette</p></figcaption></figure>

### Adaptive

The "Adaptive" palette source restricts the colors to an exact number, and any new colors are derived from the original image.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FOGHdkXLOVlX2iBPWe3hi%2Fimage.png?alt=media&#x26;token=a54cd917-6822-455b-ae82-cebfef883cfe" alt=""><figcaption><p>Palette reduced to exactly 24 colors</p></figcaption></figure>

### Active Palette

The "Active palette" palette source uses the colors from the current sprite's palette.

### Defaults

The "Defaults" palette source provides a list of the palettes that are built into Aseprite.

### File

The "File" palette source lets you choose an image to use as a palette. It must be a PNG image.

### URL

The "URL" palette source loads the image from the url in the text box.

## Dithering

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FzwE7bSZN1Pvfjk4Xec02%2Fimage.png?alt=media&#x26;token=6aee4ef8-ab29-43ba-80f3-d1bb5e0e2e03" alt=""><figcaption><p>Dithering options</p></figcaption></figure>

Dithering was a technique commonly used in older art to make better use of the then limited colors. Now, it is a common practice in pixel art used to create details, gradients, and other image features.

### Matrix Size

"Matix Size" can be set to "None" (no dithering), "Bayer 2x2," "Bayer 4x4," or "Bayer 8x8."

#### Bayer 2x2

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2F9JevUP1uiIZPkva4LpGM%2Fimage.png?alt=media&#x26;token=8386e5f3-9a84-4da7-af68-25ac4ba47236" alt=""><figcaption><p>Bayer 2x2 dithering</p></figcaption></figure>

#### Bayer 4x4

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FZ9WvIlWSkfES1zbGLHpW%2Fimage.png?alt=media&#x26;token=f40a82c2-688b-41a2-94a4-d6e367e33aa7" alt=""><figcaption><p>Bayer 4x4 dithering</p></figcaption></figure>

#### Bayer 8x8

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FwpaH38OkCK95yw0Zu7UU%2Fimage.png?alt=media&#x26;token=7d865946-21f8-407b-9a09-a7932ae58bb5" alt=""><figcaption><p>Bayer 8x8 dithering</p></figcaption></figure>

### Dither Strength

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FhDwWDFzXW9Yj56SrwRx7%2Fimage.png?alt=media&#x26;token=06d92dd3-f569-4723-ae66-75bb7c04ddc9" alt=""><figcaption><p>Strength 2, 6, and 10</p></figcaption></figure>

"Dither Strength" controls how much dithering is applied to the image.

## Denoising

Denoising is an advanced feature and is only recommended for experienced users. Without experience, denoising often leads to poor results.

<figure><img src="https://3012582686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRsObutvwqL6T4hAhfvxr%2Fuploads%2FHeWg596PL7tOOpY0qVKp%2Fimage.png?alt=media&#x26;token=af7fa5ef-66f5-4a55-b148-7cddeda10106" alt=""><figcaption><p>Left: Normal palettization to 24 colors | Right: Denoised to 24 colors</p></figcaption></figure>

### Smoothness

"Smoothness" (appears when the denoise box is checked) does exactly what it says-it controls an image's smoothness. This is related to kernel size.

### Strength

The "Strength" slider controls how aggressively the denoising tries to remove stray pixels.

## Processing Cels

This applies "Palettize" to multiple images. If both options are checked, all images in the sprite will be processed.

### All layers

The "All layers" checkbox applies "Palettize" to all layers in the selected frame.

### All frames

The "All frames" checkbox applies "Palettize" to all frames on the selected layer.

## Process in Background

"Process in background" keeps the command line interface minimized.
