- Name
-
ReplaceColors -- replace colors in a brush (V1.5)
- Synopsis
-
ReplaceColors(id, colors)
- Function
-
This function scans through a color array that you specify and replaces
each color with another color which you also have to specify. The
color array must be organized in the way: Search color 1, Replace color 1,
Search color 2, Replace color 2, ....,.
Note that if you pass a palette brush in id
, you need to pass pens instead
of colors in the table argument.
- Inputs
-
- id
- identifier of the brush to use
- colors
- color table that describes which colors (or pens) to replace
- Example
-
ReplaceColors(1, {#BLACK, #WHITE, #RED, #GREEN})
The code changes all black pixels in brush 1 to white ones and all
red pixels to green ones.