Yotsuba Games
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
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
ç”»ćƒ
image
Image
Required
ă‚€ăƒłăƒ‡ăƒƒă‚Żă‚čç”»ćƒăžć€‰æ›ă™ă‚‹ć…ƒç”»ćƒă§ă™ă€‚

Output Ports

NameTypeDescription
ă‚€ăƒłăƒ‡ăƒƒă‚Żă‚čç”»ćƒ
indexed_image
IndexedImage
ć„ăƒ”ă‚Żă‚»ăƒ«ăŒă€Œăƒ‘ăƒŹăƒƒăƒˆăźäœ•ç•Șă‹ă€ă‚’æŒă€ç”»ćƒă§ă™ă€‚è‰ČèĄšă‚’ć€‰ăˆă‚‹ăšćŒă˜ç•Șć·ăźć Žæ‰€ăŒăŸăšă‚ăŠć€‰ă‚ă‚ŠăŸă™ă€‚
パレット
palette
Palette
ă“ăźă‚€ăƒłăƒ‡ăƒƒă‚Żă‚čç”»ćƒăŒć‚ç…§ă—ăŠă„ă‚‹é€šćžžè‰Čăźäž€èŠ§ă§ă™ă€‚
ç”»ćƒ
image
Image
çŸćœšăźăƒ‘ăƒŹăƒƒăƒˆă§é€šćžžç”»ćƒă«æˆ»ă—ăŸăƒ—ăƒŹăƒ“ăƒ„ăƒŒă§ă™ă€‚
è‰Č数
color_count
Int
通澾è‰Čăźæ•°ă§ă™ă€‚ć°‚ç”šăźé€æ˜Žă‚čロットはè‰Čæ•°ă«ć«ă‚ăŸă›ă‚“ă€‚
抂芁
summary
Text
ă‚€ăƒłăƒ‡ăƒƒă‚Żă‚čç”»ćƒăźă‚”ă‚€ă‚șやè‰Čæ•°ăźçŸ­ă„èȘŹæ˜Žă§ă™ă€‚

Parameters

NameTypeDefaultRangeDescription / Options
æœ€ć€§è‰Č数
max_colors
Int
2561–256

通澾è‰Čăšă—ăŠäżæŒă™ă‚‹æœ€ć€§è‰Čæ•°ă§ă™ă€‚é€æ˜ŽăŻćˆ„æž ăȘăźă§ă€ă“ăźæ•°ă«ăŻć«ă‚ăŸă›ă‚“ă€‚

é€æ˜Žćˆ€ćźš
alpha_threshold
Int
00–255

ă‚ąăƒ«ăƒ•ă‚ĄăŒă“ăźć€€ä»„äž‹ăźăƒ”ă‚Żă‚»ăƒ«ăŻă€é€šćžžè‰ČではăȘăć°‚ç”šăźé€æ˜Žă‚čロットにăȘă‚ŠăŸă™ă€‚

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
Image To IndexedImage — PixPipeline Node Reference