Batch Processing Sprites with Preset Palettes
When you need to create the same color variant across dozens of sprites, manual swapping isn't practical. The preset system in PixelPaletteSwap lets you save color mappings and apply them consistently across all related assets. This guide covers efficient batch processing workflows.
Understanding Presets
A preset is a saved record of which original colors map to which new colors. When you create a "blue team" variant by swapping red → blue, brown → navy, and orange → cyan, those three mappings are saved together. Loading that preset on any sprite with matching original colors will apply the same transformations.
Preset File Format
Presets are saved as JSON files, making them human-readable and easy to version control. Each preset contains an array of color pairs: original hex code and replacement hex code.
Creating Your First Preset
Step 1: Perfect One Sprite
Start with one representative sprite—usually your main character's idle animation. Take time to get this exactly right, as every other sprite will use this as a template.
Step 2: Swap All Colors
Swap every color that needs to change. Don't forget secondary colors like outline tints or small accent details. The more complete your preset, the more consistently it will apply across other sprites.
Step 3: Export the Preset
Click "Export" in the Color Swap Presets section. Give it a descriptive name like
knight_blue_team.json. Save it somewhere organized—ideally in a "presets" folder
alongside your project files.
Applying Presets to Multiple Sprites
Sequential Workflow
For small batches (under 10 sprites):
- Upload the next sprite
- Click "Import" and load your preset
- The tool automatically applies all matching color swaps
- Export the result
- Repeat for each sprite
What "Matching" Means
The preset matches colors exactly by hex code. If your preset says "swap #FF0000 to #0000FF," it will only affect pixels that are exactly #FF0000. A slightly different shade like #FF0001 won't be affected.
This is why consistency in your original sprites matters. If your walk cycle uses #FF0000 but your attack animation uses #FF0102 for what looks like the same red, the preset won't catch both.
Handling Inconsistent Palettes
Palette Auditing
Before batch processing, audit your sprites. Upload each one and check the detected color count. If identical elements show different colors across sprites, you have inconsistency to fix.
Normalizing First
Consider doing a normalization pass first. Create a "master palette" preset that maps any near-duplicate colors to their canonical versions. Apply this to all sprites before doing your variant swaps.
Expanding Presets
If you encounter a sprite with colors your preset doesn't cover, add the new mappings manually. Then export an updated preset. Over time, your preset becomes more complete.
Organizing Multiple Presets
Naming Conventions
Use consistent, descriptive names:
character_blue_team.jsoncharacter_red_team.jsoncharacter_halloween.jsonenvironment_winter.json
Folder Structure
Keep presets organized by project and category:
/MyGame
/Art
/Sprites
/Presets
/Characters
knight_blue.json
knight_red.json
/Environments
forest_autumn.json
forest_winter.json
Version Control
Commit your preset JSON files alongside your art assets. When you adjust a color mapping, the change is tracked and can be rolled back if needed.
Workflow Best Practices
Test Before Batch
Apply your preset to 2-3 varied sprites before processing dozens. Catch issues early on a walking sprite, attacking sprite, and special ability sprite.
Keep Originals Separate
Never overwrite originals. Export variants to a separate folder:
/sprites/knight/original//sprites/knight/blue_team//sprites/knight/red_team/
Document Preset Contents
Create a simple readme noting what each preset does. Future you (or team members) will appreciate
knowing that halloween.json swaps greens to purples and adds orange tints.
Create a visual reference sheet showing the original sprite next to each variant. Include the preset filename so anyone can reproduce the result.
Common Issues and Solutions
"Preset didn't change anything"
The most common cause: color mismatch. Your preset was made on a sprite with #FF0000 but this sprite uses #FF0001. Re-audit the colors and either fix the sprite or update the preset.
"Some colors changed, others didn't"
You have a partial match. The preset is working for some colors but missing others. Open the original sprite the preset was created from and compare palettes.
"The result looks wrong"
Check if the sprite has colors the preset wasn't designed for. A different character might have skin tones that weren't in your original preset, which now remain unchanged and clash.