[id] = ExtractPalette(id, srctype, srcid[, frame])
srctype and srcid,
creates a new palette and assigns the identifier id to that new palette. If you pass
Nil as id, ExtractPalette() will return a handle to the new
palette to you. Otherwise the new palette will use the identifier specified
in id.
The following object types can be passed in srctype:
#ANIM:srctype to #ANIM, you also need to
pass the anim frame whose palette should be extracted in the frame parameter.
Frames are counted from 1, which is also the default value for frame.
#BGPIC:
#BRUSH:
#FONT:
#SPRITE:srctype to #SPRITE, you also need to
pass the sprite frame whose palette should be extracted in the frame parameter.
Frames are counted from 1, which is also the default value for frame.
#ANIM or #SPRITE (defaults to 1)idExtractPalette(1, #BRUSH, 10)The code above extracts the palette from brush 10 and stores it as palette object 1.