I want to draw with only 4 colors!

I’m in trouble. I’d like to ask you for your help.

Today, I tried to make an animation with only 4 colors in aseprite, but when I save it as a GIF, the palette has more than 4 colors.

Please tell me how to solve this problem. How can I make palette show only colors on screen or paint with only colors on palette?

(The increasing number of colors, except for black, are those used in the drafting process. However, I erased these colors from the canvas and also from the palette.

I think the index color is involved, but I don’t know how to deal with it…)


Switch to Indexed mode. Delete colors from palette. Press ‘Remap’ button. Done.


Thank you.
However, I already switch to index color and delete colors.…

However, if I delete the file, save it, close it, and reopen it, the colors are still there…

I’m sorry for the delay, but I’ve put together a list of things I need help with.

〈Problem: What I want to solve〉

When I save a GIF, I want to keep the palette that was there before I saved the GIF.:
=When I save a GIF, I want to get rid of the transparent and black colors (both look black) that appear in the palette.

I don’t get what you want. You may keep your art in ASE format. And only save GIF when you need to export your art somewhere.

1 Like

aseprite usually adds transparent colour when it opens gif file, if you don’t have transparency in your sprite, you can delete if it bothers you (you have to be in rgb mode for that).
otherwise aseprite stores to colour table all the colours which have been used in gif. you can get rid of all colours which are not directly part of an image by switching to rgb mode and creating new palette from sprite: How to create a palette with the colors of the current sprite?
if the palette still has more colours than expected, it means there are used somewhere in the image. in that case you want to use replace colour function. go to edit > replace color.

1 Like

Thank you, Olga_Galvanova.

I did what you said, and the extra color was gone from the palette (it looks like the color was still on the screen)! Thanks!

Set the GIF to RGB mode
→create a palette from the current sprite
→remove the transparent color and black, and
save the GIF
→open the GIF again
If I do that,
the transparent color and black appear in the palette…

Is this unavoidable because GIFs are automatically saved with index colors?
Is it possible to remove the transparent and black colors that appear when saving a GIF?

I know this is a bit of a rambling question, sorry.
However I would be very grateful if you could respond to the question.
Thank you

hi, yes, the transparent colour is always there.
now i realized one thing: when i open my 4 colour gifs i get this kind of palette:
transparent mask (not used), 4 colours i actually used, 3 more black colours i didn’t use.
i don’t know if this is caused by the way aseprite imports gifs or if it actually exports them like that.
i can remove those three black colours, but i can’t remove the transparent colour in indexed mode, because aseprite will expect one of the colours in the palette to serve as transparent.

all in all, the best way would be - as BraidAcer recommended - to store your work in aseprite / ase format and use gif files only for export. aseprite format will always have a palette consisting only of colours you set up. exported gif will keep that palette as long as you don’t use other colours in the image (those are going to be added to colour table during export). accidentally using colours outside the palette can be prevented by working in index mode (you will need one transparent colour for that anyway).

also, you can check number of colours in your gif or png files with pj image inspector after export. if that online tool says there are 4 colours, then there are only 4 colours in your image and you don’t have to bother yourself thinking about what is stored in colour table unless you have specific reason for that.


I found out that GIF palette must consist of 2^N elements. With 4 colors and 1 forced transparent you get minimum of 2^3 = 8 colors.


BraidAcer, Olga_Galvanova

Oh, I see… that’s interesting.
So that’s why the colors are added when I make a GIF…!
Thank you!!! I finally understand!

I used to check the number of colors in GIFs by opening them in Aseprite… that wasn’t good either…
I did what Olga_Galvanova said, and it worked!
I can confirm that there are four colors, problem solved!

Thank you so much! Thank you both so much!!!

1 Like