How to generate random 'greenish' colors
colors, language-agnostic, python, random
Solution
Simple solution: Use the HSL or HSV color space instead of rgb (convert it to RGB afterwards if you need this). The difference is the meaning of the tuple: Where RGB means values for Red, Green and Blue, in HSL the H is the color (120 degree or 0.33 meaning green for example) and the S is for saturation and the V for the brightness. So keep the H at a fixed value (or for even more random colors you could randomize it by add/sub a small random number) and randomize the S and the V. See the wikipedia article.
Problem
Anyone have any suggestions on how to make randomized colors that are all greenish? Right now I'm generating the colors by this: ``` color = (randint(100, 200), randint(120, 255), randint(100, 200)) ``` That mostly works, but I get brownish colors a lot.