Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pixel Fx Designer

Design pixelart effects and render them to .png sprite sheets or .gifs · By CodeManu

Color very slightly off when exporting with a custom pallette

A topic by SpaceMouse created Jul 20, 2018 Views: 219 Replies: 2
Viewing posts 1 to 3
(+1)

Hello! Just got this today and I really love it. But I've found an oddity with exporting as a gif. Some of the colors in the limited pal I have set change _ever_ so slightly. In the pal file I have:

JASC-PAL
0100
4
0 0 0
75 75 75
154 154 154
255 255 255

But when I export the image, the 75s become 74s, and the 154s become 153s. Is there something wrong with the pal file? I was going off the gameboy one as an example.

Also, as a sidenote, export as gif always exports in the directory of the executable with a default name?

Developer

Hi SpaceMouse!

It's nothing wrong with the .pal file, this minor color change is due to the palette shader, it gets the colors from the .pal file, for example (75,75,75) then divide them by "255" to get the correct color for the shader. In this example this will give "0.2941176" (with a lot more decimals), and my guess is that when it turns the value back to rgb on the image, it gets rounded to two decimals, "0.29", which multiplied again by 255 gives a result of "73.95". This is how shaders works and I don't think I can do much about it, sorry :(

And about the .gif, it only exports to the same directory due to the tool being made in Game Maker Studio 2, which doesn't have a prope .gif export. It has to export a spritesheet and use ImageMagick with cmd commands to render it as a .gif, which doesn't allow the user to choose the directory or name. Maybe the program will support a better export in the future, but this is the only workaround I could think of atm.

(+1)

I actually use GMS2 myself! I noticed the icon for the program was GMS2's icon. If I may ask, why aren't you using make_color_rgb() ?