Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tomblack.ca/llms.txt

Use this file to discover all available pages before exploring further.

Pixelate gives you three ways to control the color palette of your sprite sheet output. You can let Pixelate analyze the rendered frames and generate a palette automatically, supply your own palette texture to enforce a fixed set of colors, or disable palette limiting entirely to get full-color output. Two additional threshold settings let you fine-tune how aggressively Pixelate consolidates similar colors and filters noise.

Palette modes

Set the Palette Style field on the PixelateCaptureManager to choose your palette mode.
ModePaletteStyle valueDescription
Auto0Analyzes the rendered frame and auto-generates a palette using K-means clustering.
Custom1Uses a palette you supply as a 1-pixel-tall PNG texture.
None2No palette limiting — full color output.

Auto

In Auto mode, Pixelate samples the rendered frame and runs K-means clustering to derive a representative palette. You control the palette size with Auto Palette Color Count (_paletteColorCount). A higher count preserves more color variation; a lower count produces a more stylized, restricted look.
Auto Palette Color Count
int
default:"16"
The number of colors in the auto-generated palette. Minimum value is 1. Higher values preserve more color variation; lower values enforce a more stylized, restricted look.
After capture, Pixelate saves the generated palette as a PNG alongside your sprite sheet:
{TargetName}_Palette.png
You can open this file to inspect the derived colors, or import it back into Unity as a Custom palette for future captures.

Custom

In Custom mode, you supply your own palette texture. Pixelate maps every pixel in the rendered frame to the nearest color in that texture. Your palette texture must meet the following requirements. Pixelate validates all of these at capture time and logs any errors to the Console.
SettingRequired value
Texture shape1-pixel-tall PNG (any width)
sRGBEnabled
Non-Power-of-2None (if the texture width is not a power of two)
Read/WriteEnabled
Streaming MipmapsDisabled
Virtual Texture OnlyDisabled
Mip MapsDisabled
Wrap ModeClamp
Filter ModePoint (No Filter)
FormatRGBA 32-bit
1

Create or export your palette as a PNG

Each pixel in the image represents one palette color. The image must be exactly 1 pixel tall. Width equals the number of colors in your palette.
2

Import the PNG into Unity

Drag the PNG into the Project window. Do not let Unity resize or compress it.
3

Configure the texture import settings

Select the palette PNG in the Project window and apply the required import settings listed in the table above. Click Apply.
4

Assign the texture to Pixelate

In the PixelateCaptureManager Inspector, set Palette Style to Custom and drag your palette texture into the Custom Palette field.
If any import setting is incorrect, Pixelate logs an error to the Console at capture time and the capture will not proceed. Check the Console if the capture button appears to do nothing.

None

Setting Palette Style to None disables palette limiting entirely. Pixelate writes the full rendered color output without any quantization or mapping. Use this when you want to post-process colors yourself or when your pipeline does not require a restricted palette.

Threshold settings

These two settings are available in all palette modes and control how Pixelate handles near-identical colors during palette generation and application.
Filter Abs Color Threshold
float
default:"10"
Range: 150. Controls how permissive Pixelate is toward color noise when analyzing the rendered frame. Higher values tolerate more variation between similar colors, treating them as acceptable alternatives. Lower values are stricter, filtering out colors that differ only slightly from the dominant palette entry.
Palette Color Consolidation Threshold
float
default:"3.8"
Range: 1100. When two colors in the generated palette fall within this perceptual distance of each other, the less-used one is removed and its pixels are remapped to the more common color. Increase this value to merge more similar colors into a smaller final palette; decrease it to preserve finer color distinctions.
If your sprite sheet has speckled single-pixel noise in solid-color areas, try lowering Filter Abs Color Threshold. If the palette still contains near-duplicate colors after capture, raise Palette Color Consolidation Threshold.