Hello Stephen Rong,
involving the background color is not possibly. What you can do is to display the icon twice: one half in color A and second half in color B.
To achieve this effect you will need two Image views arranged side by side as demonstrated below. One Image view is intended to display the image in color A the second Image view in color B:

Now using the property ScrollOffset of the both images adjust the horizontal position of the displayed images so that they overlap:

At the runtime, when the edge between the both images moves, update the ScrollOffset properties only.
I hope it helps you further.
Best regards
Paul Banach