Made by KaadmY
Generates a palette and accompanying lightmap from either a palette image or defined programmatically.
Notes
The Doom palette is not included since it's not public domain and I didn't want to bother with it, you can easily supply your own version.