Reverse video in xterm
If you get reversed video (background and foreground colors are swapped) in an xterm for your X-Win32 session (usually only with rexec, rsh, or StarNetSSH sessions), typically on the AIX operating system (a version of UNIX distributed by IBM), then you most likely need to add the following line to the .profile file in your home directory on the AIX system:
export TERM=vt220
Then, close your session and re-open it and the colors will be fixed.
NOTE: This problem typically happens when using man to view man pages (or manual pages) for commands on the remote host.
Screen shot of reversed colors in an xterm on AIX

For additional information, please see the web page of the xterm maintainer, Thomas Dickey: XTerm FAQ

Solutions