pen = GetFreePen([t])
GetFreePen()
to use the current display, you can select the active palette image using the SelectPalette()
command but keep in mind that you need to select a palette object that has pixel data
attached, e.g. a palette brush or a palette BGPic. Just selecting a palette object won't
work because free pens can obviously only be determined if there's pixel data.
You can also use the optional table argument t
to specify the source palette object.
The table argument supports exactly the same arguments as the optional table argument
of GetPen(). See GetPen for details.