Each color scale is initialized with a configurable number of base hues. There are 18 shown below. There are also several palettes available.
Each string is hashed to an integer, then mapped to one of the base hues above. If there is a collision, the color that is later in an alphabetical sort gets nudged a little darker or lighter to disambiguate. I would call it mostly stable, in that the same array of strings will always return the same colors, but the same individual string may shift a little depending on its peers.