[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Forcing sprites to use specific palette entries?



Have you looked at the palette functions on surfaces?

http://www.pygame.org/docs/ref/surface.html#Surface.get_palette

-Thiago

On Thu, Aug 12, 2010 at 8:56 PM, John Anderson
<corporalmustard@xxxxxxxxx> wrote:
> Hi, I was wondering if it was possible to force an 8-bit colour sprite to
> use a very particular set of palette entries, like say, Sprite A uses colour
> indicies 0 - 16, and Sprite B uses 17 - 32. As it stands, pygame
> automatically assigns the colours in a sprite to the closest colour on the
> main palette, meaning that it is very hard to predict which colours are
> where, and thus makes palette swapping a nightmare, is there any way around
> this?
>