reversecolor

reversecolor is a rarely used transform filter. It corresponds to the transform reversecolor which is described in more detail in the documentation for flipcolor.

reversecolor F

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 -reversecolor command line option

The major purpose of the reversecolor filter 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 -reversecolor command 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 
      1==x

You can invoke this with

cql -reversecolor foo.cql
and the file's body will be changed to
  wtm mate
  square all x in 
      1==x

This is occasionally useful for experimentation.