Random HTML color code for charts

When you do stack charts, it is important that the colors differ so much from each other that they are not mixed up. I made a function that returns a predetermined number of color codes that I've tested that is not too similar to each other.

When these color codes ends, a random number generator creates new color codes, these are not controlled, but my tests shows that it will do well.

Maybe I am doing a new feature one day that randomly generates an indefinite series of colors that can lie next to each other without being mixed up.

utf-8, htmlentities and htmlspecialchars in RSS feeds

Writing an RSS feed based on HTML can cause some trouble using htmlentities though it converts too much, use htmlspecialchars instead.

First: The utf8_function function converts from ISO 8859-1 to UTF-8. So you only need this function, if your input encoding/charset is ISO 8859-1. But why don’t you use UTF-8 in the first place?

Second: You don’t need htmlentities. You just need htmlspecialchars to replace the special characters by character references. htmlentities would replace “too much