Here is a table of all 256 combinations of foregrounds and backgrounds. Click on the image to enlarge and then use the number of your chosen combination in your program.
Here is the full sized chart.
Here is the source.