This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/5799/. Also, please do not modify any references to the original work (if any) contained in this content.
This calculator below generates colors set from given starting color to given ending colors, producing rainbow like colors band. This can be used for website, or for chart bars/lines coloring, etc. I explain method for colors generation below the calculator.
The task to generate colors set between two given colors is not as trivial as you may think. The problem is that the programmers (may be designers too, I am not sure) often use RGB model for description of color. It consists of three values of red, green and blue colors. If we visualize it as cube in 3-coordinate space, we will get something like that (source).
Now imagine we have two points in this three dimensional space - it is quite hard to create simple enough method to move from one color point to another color point and get meaningful results.
Now we can easily make movement from one color to another. This is how this calculator works - it converts RGB colors into HSV colors and then uses simple linear interpolation to generate set of colors between them. The only note is that using it we transform colors from 16777216 RBG color space (0-255, 0-255, 0-255) to 3600000 HSV color space (0-360, 0-100, 0-100), and back tranformation can give slightly different values for starting and ending colors.