Foreground: You can set the "Foreground text" in your application manifest to dark or light.
Background: This follows the "Background Color" in the application manifest - and therefore will be the same as the background with the application tile.
For most of the applications I've worked on, just set the color of the tile according to the user interface specification, and then set the “foreground text” to light or dark. You can also override dark / dark themes if you wish.