I see what you are saying but using HSLToColor works exactly the same.
For example if the outcome of (Iterations * CAmount) is 173, you would have
HSLToColor(173, 100, 50). It is above 100 so it automatically wraps around and makes the same color as HSLToColor(73, 100, 50)
So any number, even 20945820958 can be plugged into it.
This is an old post. Not sure if you're still looking for updates.
What you need to do is come up with a non-linear mapping from iteration number to pixel color.
The rate of change in iteration value over distance for high iteration pixels is MUCH higher than the rate of change for low iteration pixels. If you use a linear color change, the color change is too gradual at low iteration values and way too large for high iteration areas. As a result, the highest iteration parts of your plot get a riot of colors that your eyes can't make sense of.
It helps if you come up with a scheme where you generate a value from 0 to 1. At 0, you use the starting color. At 1, you use the end color.
One way to handle it is to use the log of the iteration number to calculate the color from start color to end color. You need a way to normalize the numbers so you can plot from start color to end color.
If you calculate the log of the lowest iteration value in the plot {log(min_iterations)}, and the log of the highest iteration in the plot {log(max_iterations)}, you can then calculate the color value for any pixel with color = (log(pixel_iteration) = log(min_iterations)) / (log(max_itrations) - log(min_iterations))
That gives you a value that varies from 0 to 1, where the value changes quite rapidly at the low iteration ranges in your plot, and much more slowly at higher iteration values, and thus reduces the amount of visual noise for high iteration pixels.
As the article you link says, an even better way is to use a histogram of the iteration counts in the image to calculate a color value. For any given pixel, you can use something like:
color = (sum of pixel count for all iteration values < pixel_iterations) / total_non_mandelbrot_pixels_in_plot.
That way, the lowest iteration pixel in the plot gets a color value of 0 (starting color.) The highest iteration non_mandelbrot pixel in the plot gets a color value of 1 (end color) and pixels in-between get a color that's proportional to the total number of pixels with a lower iteration value. This does a great job of evenly distributing color values.
I took a stab at recreating your plot using histogram-based colors in my App, FractalWorks. Here's the result:
