[Graphics] Palette making?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Izthat
Posts: 8
Joined: Wed Jan 23, 2019 3:49 pm

[Graphics] Palette making?

Post by Izthat »

I've read a few things regarding palettes. But none of them have really explained anything. So far I've found only two ways to either make or replace the standard palette.
1. Import one from another game: Pretty easy as SLADE has a bunch stored. Plus anyone who makes a palette with the right format can just drag and drop.
2. Make one from scratch: Now, here is where it goes to hell. You can supposedly just extract a palette from any PNG. But, if you have multiple PNG's, with a wide array of colors, then what? Make one big image that has possibly all the colors you might need? One example that you can easily find mentions how someone wrote down the RGB values and just copied them over one at a time!

Is there no good way to generate a palette from a large PNG? I even tried slapping everything together in one image and all I got was an error. What am I doing wrong here? Is there some specific software that people use for this? After messing around in Photoshop all I can extract is a 256 color GIF; which can't be read by Slade.
User avatar
Enjay
 
 
Posts: 26540
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [Graphics] Palette making?

Post by Enjay »

Here's an example of the kind of image that Slade can read for palette info. At least, I'm sure that I used it for that a while back.

Image
Gez
 
 
Posts: 17921
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Graphics] Palette making?

Post by Gez »

Yes, a square image with 256 unique colors in a grid (they can be larger than 16x16, as long as each cell is square and only contains one single color) is what SLADE will accept to import as an image palette.
User avatar
Izthat
Posts: 8
Joined: Wed Jan 23, 2019 3:49 pm

Re: [Graphics] Palette making?

Post by Izthat »

Enjay wrote:Here's an example of the kind of image that Slade can read for palette info. At least, I'm sure that I used it for that a while back.
Does the order of color matter? The only thing I'm certian of is that at least one has to be the "transparent" color.
User avatar
Jimmy
 
 
Posts: 4723
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him

Re: [Graphics] Palette making?

Post by Jimmy »

The order of colors only matters if you want to preserve the existing color ranges and avoid things looking extremely weird in-game. If you're making a palette from scratch, this won't matter to you.

There's also no such thing as a palette index used for transparency, so you'll be safe replacing whatever colors you need.

Return to “Assets (and other stuff)”