The "solid" (transparency=0%) pixels use the foreground color, the "transparent" (transparency=100%) are the background color, the partially transparent pixels use a blend of background/foreground color based on transparency. It led to a "tile magic" (I think Ironhand first invented it and its name) where you make the real background just black and use foreground/background colors to make different-looking sprites out of a single sprite (i.e. you could have two overlapping images, where you could show the first one using a foreground color, the second one using a background color or a mix using both).
An example: a small creature as a foreground color and a worm as a background color on a place of pet's tail. You could toggle foreground color to show a small creature (frog? hamster?), toggle background color to show a small worm (or a snake?) or both to show a small critter with a long tail (a squirrel?).