[Reusable] Palette Puller

This thread contains content that may be reused, modified, or ported by anyone.
Not open for further replies.


ms reflec beat stan
This is a simple EXE that takes a PNG and extracts the top 256x1 pixels into a PLAYPAL lump for importing into WAD editors. Check the readme for instructions. Source files are included since they're super small anyway.

What's the point of this? Well, since the source PNG can be as big as you want (the rest of the image is simply ignored), you can embed the default palette into the corner of a map screenshot (or collage) and color grade it in an image editor of your choosing. The resulting image can be ran through this program to generate a palette that will accurately* represent your color grading in-game. Instructions on how to achieve this are included in the download.

As an example, here's a map screenshot using the default SRB2 palette:


A color graded batch of screenshots, including the one above, with the palette embedded into the image before editing:


And the final result in-game after importing the palette: (this example didn't translate perfectly because of a global colormap that had to be redone, but I think the final result looks better anyway)


This tool was directly inspired by a blog post describing MGS V's graphic engine, specifically the color grading section and example workflow.

Source code and a compilation command are both included in the download for tinkering.

*Light levels and transparencies will reflect identically in-game to the post-grading reference as long as you copy the COLORMAP lump from srb2.srb. In-level colormaps will not be. You may need to adjust your colormaps after importing your new palette. Global colormaps should be removed and the effect achieved in the color grading process instead; it's higher-fidelity that way anyway :)


  • palette-puller.zip
    918.4 KB · Views: 321
  • ref_SAMPLE.png
    783.6 KB · Views: 1,786
  • kart0088.png
    156.1 KB · Views: 1,733
  • kart0078.png
    152.3 KB · Views: 1,681
Last edited by a moderator:


ms reflec beat stan
The screenshots are from Kart because I was making a Kart mod when I put this together. This works exactly the same for vanilla SRB2, and in fact could be used for any Doom mod, or anything that accepts a 256-color palette file as a series of RGB8 values.
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)