I would like to get a range of colors for a specific color to create a tag cloud.
Say that the user has entered some color with RGB/HHHHHH values, then I would like to write a function f(color, no) that returns RGB/HHHHHH for "no" different shades from dark to light colors for the specified "color". These colors will then be useful for displaying different tags with different colors of the same hue. But I would like to avoid black and white shades.
The following is an example of F({R:0, G:0, B:255}, 7) that returns 7 shades of blue.

I would not want this to be true for any combination of RGB, for example, (25, 150,150) .
Is it possible to use this function using JavaScript, or is there any formula for RGB with which this can be achieved?
javascript colors rgb graphics
Anil namde
source share