Wow, this is fantastic and very helpful. Thank you.
Some comments. I am using the LCH color space, but everything you say still holds. For a given L and C, Hue of 90° (for example) is the same colour as -270° and 450°.
Do I want the possible results to be equally distributed? Yes!
Do I want ranges that can be centred on red? I assume this is a rhetorical question. I want the possible ranges to cover the full 0…360. Which they do with your method.
I tried this
PVector randomRangeJ() { // @jeremydouglass
float start = random(0, 360);
float end = (start + random(45, 90))%360;
return new PVector(start, end);
}
It seems that this method is also equally distributed, but is simpler code. Which of your two methods is preferable?