Studio Yotsuba
Back to Node List

Image To IndexedImage

image_to_indexed_image

Converts an image into palette-number pixels and extracts its palette.

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
image
Image
Required
Image to convert.

Output Ports

NameTypeDescription
IndexedImage
indexed_image
IndexedImage
Image stored as palette numbers instead of direct colors.
Palette
palette
Palette
The normal colors used by this indexed image.
Image
image
Image
Rendered preview image.
Color Count
color_count
Int
Number of normal palette colors. The transparent slot is not counted.
Summary
summary
Text
Short indexed image summary.

Parameters

NameTypeDefaultRangeDescription / Options
Max Colors
max_colors
Int
2561–256

Maximum number of normal colors to keep. Transparent is separate.

Alpha Threshold
alpha_threshold
Int
00–255

Pixels with alpha less than or equal to this value become the transparent slot.

What is it for?

  • Adjusting every occurrence of the same color in an image at once
  • Extracting the image's color table and editing it as a palette
  • Converting pixel art from an ordinary RGBA image to indexed color management

Overview

The entry point to the indexed-color workflow. It splits an image into numbered pixels plus a color table. From this point on, replacing only the color table (palette) recolors the entire image, forming the basis of color variants, palette cycling, and color-scheme experiments.

Usage tips

  • Start with the three-part pattern: Image To IndexedImage → (process the palette) → indexed_image_apply_palette / indexed_image_render. Every indexed recoloring technique begins here.
  • Conversion uses exact matches. Reduce images with many colors first using palette_quantize or a similar node.
  • Send the extracted palette to editing (palette_edit), adjustment (palette_adjust_oklch), or cycling (palette_cycle).

Related nodes

  • indexed_image_apply_palette / indexed_image_render — the go-to downstream nodes
  • palette_quantize — reduces colors beforehand
  • palette_edit / palette_adjust_oklch / palette_cycle — process the extracted palette

Transparency handling

  • Transparent pixels are normally excluded from the palette.
  • A transparent slot does not count toward the number of colors.
  • This keeps transparency from shifting the order of imported colors or deliberate four-color groups.

Notes

  • v1 uses exact-match conversion.
  • The node reports an error if the source image contains more than max_colors.
  • Antialiased images tend to contain many colors; reduce them first or use Palette Quantize.

Examples

  1. Load an image with Image Load.
  2. Connect it to Image To IndexedImage.
  3. Use the output palette as the basis for an editable palette.
  4. Replace only the color table with IndexedImage Apply Palette.
  5. Convert it back to a regular image with IndexedImage Render.
Back to Node List