RemapBrush -- remap brush colors (V9.0)
RemapBrush(id, palid[, t])
This function can be used to remap the colors of the brush specified by id to the colors of the palette specified by palid. The source brush can either be a normal or a palette brush. If it is a normal brush, RemapBrush() will also convert it to a palette brush while remapping so the resulting brush will always be a palette brush.

The optional table argument t can be used to specify additional options. The following table tags are currently recognized:

This tag allows you to control whether or not dithering should be used. Set this to True to enable or to False to disable dithering. Defaults to True.

Note that if the brush uses transparency, you have to use SetTransparentPen() on the palette first to define a pen that should be made transparent.

identifier of the brush to remap
identifier of the palette whose colors the brush should be remapped to
optional: table containing further arguments
CreatePalette(1, {#BLACK, #WHITE}, {Depth = 1})
RemapBrush(1, 1, {Dither = True})
Convert brush 1 to a black & white palette brush. Remapping will be done with dithering enabled.

Show TOC