Aseprite

Aseprite

Cheshire Feb 26, 2024 @ 9:25pm
Is there a way to apply palette changes(not using replace) to every sprite?
Recently purchased Aseprite and I know about the feature that lets you apply palette changes to an entire animation using "replace"--loving that so far, but is this also possible when just changing a color "without" using replace?

I'm new to indexing and whatnot and I really messed up my palettes for a game I'm working on and so many sprites have been indexed... incorrectly and I'm trying to make sure I have all the info before trying to fix the palette for well over four hundred sprites.
< >
Showing 1-2 of 2 comments
behreajj Feb 27, 2024 @ 10:32am 
First, speaking to just one sprite, the button to unlock the palette so that color swatches can be edited in-place is above the color bar[aseprite.org]. It looks like a little padlock. For indexed color mode sprites, changing the palette changes the images' appearance on the canvas. The shading[aseprite.org] ink[aseprite.org] might help if you need to manually replace colors in specific spots on the canvas.

For 400+ sprites, if the fix is simple enough to be automated, I'd write a Lua script[aseprite.org]. The app fs[www.aseprite.org] module helps to handle directories, file extensions, etc. Sprites[www.aseprite.org] and Palettes[www.aseprite.org] can be loaded from a path string via the constructor with the fromFile parameter. If the indices in the bitmaps need to be swapped, then see the Images[www.aseprite.org] that belong to each Cel[www.aseprite.org] in the Sprite[www.aseprite.org]. There are also app commands[www.aseprite.org] that mirror what you'd see in the UI menus. For example, this is the script documentation for replace color[www.aseprite.org].
Last edited by behreajj; Feb 27, 2024 @ 10:42am
Cheshire Feb 27, 2024 @ 8:43pm 
Originally posted by behreajj:
First, speaking to just one sprite, the button to unlock the palette so that color swatches can be edited in-place is above the color bar[aseprite.org]. It looks like a little padlock. For indexed color mode sprites, changing the palette changes the images' appearance on the canvas. The shading[aseprite.org] ink[aseprite.org] might help if you need to manually replace colors in specific spots on the canvas.

For 400+ sprites, if the fix is simple enough to be automated, I'd write a Lua script[aseprite.org]. The app fs[www.aseprite.org] module helps to handle directories, file extensions, etc. Sprites[www.aseprite.org] and Palettes[www.aseprite.org] can be loaded from a path string via the constructor with the fromFile parameter. If the indices in the bitmaps need to be swapped, then see the Images[www.aseprite.org] that belong to each Cel[www.aseprite.org] in the Sprite[www.aseprite.org]. There are also app commands[www.aseprite.org] that mirror what you'd see in the UI menus. For example, this is the script documentation for replace color[www.aseprite.org].

First of thanks for the info, it's been really interesting, and it gave me hope for about seven hours or so, but at this point. I think I'm at the end of my rope and I'll just start manually changing pixels over the course of two weeks until it's done.

I finally learned what a lua script is--used a few, and did a lot of experimenting, but after researching for half the day, I've yet to see a possible method that would let me change a color--not using "replace" and apply it to every layer without needing to do the same change literally hundreds of times over--unfortunately these aren't tiny sprites.

The biggest issue is that the color separation doesn't carry over to the other sprites and there's a lot of the same color--mostly yellow's and blue's--and hit replace changes all but the hair and armor are the same and "replace" doesn't know that.
< >
Showing 1-2 of 2 comments
Per page: 1530 50