reversecoloris a rarely used transform filter. It corresponds to the transform reversecolor which is described in more detail in the documentation for flipcolor.
matches a position
reversecolor F. The effect or
reversecolor F on
F is to swap the roles of white and black and to flip the board about the horizontal bisector. See the above link for more detail.
The major purpose of the
-reversecolor command line option
reversecolorfilter is to be invoked from the command line. If you have a particular CQL file that tests for something from one side, you can test for the exact same thing from the other side's point of view by using the
-reversecolorcommand line option.
For example, suppose your file
foo.cql has a body that tests for positions in which black is in mate and each white piece and empty square is defended exactly once:
btm mate square all x in [A_] attackedby k 1==A attacks x
You can invoke this with
cql -reversecolor foo.cqland the file's body will be changed to
wtm mate square all x in [a_] attackedby K 1==a attacks x
This is occasionally useful for experimentation.