I would think
newForeColor = BITXOR(BackgroundColor, DesiredColor)
>
>What ForeColor should I use to get a red line on a white background when drawing using XOR?
>
>How do you calculate a desired color knowing the background color when using XOR?
>
>TIA
--sb--