Currently the dynamic username coloring can choose colors that are very close to the background (light yellow on white, for instance). In addition, extremely dark or light colors are hard to distinguish from each other, as they effectively desaturate towards black or white respectively. (Desaturated colors with similar lightness are hard to distinguish in general, but I mention the light and dark cases because it's not always obvious that they are de facto desaturated.)
The color choices should be distributed such that they all have a minimum contrast to the background (choosing a maximum lightness if the background is bright, or minimum lightness if the background is dark), and otherwise distributed around color space in such a way that they are relatively well spaced perceptually.
Note that algorithms for this already exist (it's a really common problem), but many of them are unnecessarily complex for the username coloring use case, because they are trying to squeeze out the last bit of perceptual advantage for much more finicky use cases (such as reducing image palettes for compression).
Currently the dynamic username coloring can choose colors that are very close to the background (light yellow on white, for instance). In addition, extremely dark or light colors are hard to distinguish from each other, as they effectively desaturate towards black or white respectively. (Desaturated colors with similar lightness are hard to distinguish in general, but I mention the light and dark cases because it's not always obvious that they are de facto desaturated.)
The color choices should be distributed such that they all have a minimum contrast to the background (choosing a maximum lightness if the background is bright, or minimum lightness if the background is dark), and otherwise distributed around color space in such a way that they are relatively well spaced perceptually.
Note that algorithms for this already exist (it's a really common problem), but many of them are unnecessarily complex for the username coloring use case, because they are trying to squeeze out the last bit of perceptual advantage for much more finicky use cases (such as reducing image palettes for compression).