S
spritesynthDOCS

Colors & Palettes

Target palette selection, color reduction, and built-in palettes.

Colors & Palettes

Control the color output of your generations. Constrain to specific palettes, reduce color count, or use built-in retro palettes for authentic pixel art.

Parameters

NameTypeRequiredDescription
palettestring/arrayNoTarget palette name or array of hex colors
color_countintegerNoMax number of colors in output (4–256)

Palette Formats

Named Palette

{ "palette": "nes" }

Custom Hex Array

{ "palette": ["#000000", "#ffffff", "#ff0000", "#00ff00", "#0000ff"] }

Built-in Palettes

PaletteColorsDescription
nes54NES console palette
gameboy4Classic Game Boy greens
snes256SNES console palette
pico816PICO-8 fantasy console
endesga_3232Popular indie game palette
lospec500500Curated collection of palettes

Color Count

Reduce the number of colors in the output for a more retro look:

CountStyle
4Very limited, Game Boy-like
8Early retro, strong limitations
16Classic pixel art sweet spot
32Detailed pixel art
64+Near-photorealistic pixel art

Example

curl -X POST https://api.spritesynth.com/api/generations/image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "a fantasy forest scene",
    "palette": "pico8",
    "color_count": 16
  }'

Tips

  • Named palettes enforce strict color limits for authentic retro feel.
  • Custom hex arrays give you full control over the color scheme.
  • Combine palette with color_count for maximum control.
  • Browse community palettes at Lospec.

Need help?

Join our Discord community for support and tips.
Was this page helpful?

On this page