Closed Arecher closed 1 month ago
Hi @Arecher, check that Palette:getColor()
is documented as Palette:getColor()
and not as Palette.getColor()
. Which means that you have to use the function with :
, in practice using mypalette:getColor(1)
on Lua is exactly as you discovered, it's like calling mypalette.getColor(mypalette, 1)
.
You're completely right, my bad! I mess up the :
and .
all the time, but usually it just tells me that that function/variable doesn't exist, so the fact that they both exist threw me off!
Thanks for the clarification!
It's incorrectly stated in the documentation here: https://www.aseprite.org/api/palette#palettegetcolor
I presume it's a recent change, due to all the mentions about Palettes becoming frame based in the future.
When using
I got the error that it expected a PaletteObject, not an index on the first argument.
However, this did work: