invert pencil colors depending on background