Maximum Color Contrast
If you are using deterministic color generation, then it runs the full spectrum of possible colors as results. To handle the good, the bad and the ugly colors, you need to be able to determine and adjust complimenting text and backgrounds to create the maximum contrast and readability. These are a few quick and simple functions that can help.
HLS World Map
There are several algorithms out there to programatically generate a color from text, but this takes it one step further and generates a color based on a physical location.