>Average RGB would be r1+r2+...rn, g1+g2+...gn, b1+ b2... +bn, then divided with the number of colors in the first set. That would be the medium tone of the whole set.
Ok, I see. So, based on the image I provided for the green, I would then add them up, all the colors, and obtain the average.
>I meant that you then decide what you want the medium tone for the 2nd set to be, and then create all the colors by applying the proportion,
>
>OldColor4/OldMedium=NewColor4/NewMedium
Thanks
>IOW, make each new tone from the new medium tone, in the same proportion as one held between the corresponding tone and the medium of the first set. This should at least eliminate the rounding error that we get when some RGB components are smaller numbers. Division with a small number is the most sensitive simple operation when it comes to rounding errors, and in these darker tones we may not notice a shade being off this way or other. But when we multiply that to get a lighter shade, those errors start piling up into the lighter shades where our eyes see better.
Interesting, in deed.
>Likewise, I suspect a similar error when the starting color is too light - not as much roundoff, but simply optical error, the trick of light which would throw our judgment off, and we get surprised with the result.
>
>But as Thomas said, my method is far from perfect, there's a chance that, if you apply it to contrasting pairs, you get values over 255 or that you get something too close to zero where it shouldn't be.
For now, we will leave it as is. The green is a perfect match. But, for the blue, we'll leave that to a manual setting of the colors from the eye of a graphic artist, if needed. For now, I have provided a blue set of colors manually that is better than the original. However, this is not a deviation from the green set. If I have the time later on to fine tune the code in regards to that, I will see how using some code to calculate all the other colors could do.
Thanks for the help