aseprite / api

Scripting API for Aseprite
https://www.aseprite.org/api/
MIT License
238 stars 48 forks source link

How to properly use Pallete `fromFile`? #42

Open rikashore opened 3 years ago

rikashore commented 3 years ago

fromFile states that it takes a filename, although I am not sure on what its supposed to take, is it a string with the pallete's name or is it a string of the path to the pallete?

dacap commented 3 years ago

fromFile is a full path/filename (e.g. c:/Users/David/Downloads/mypalette.gpl).

If you want to load a palette that is displayed in the palette presets popup inside Aseprite, you can use the fromResource

https://github.com/aseprite/api/blob/main/api/palette.md#palette-1