Generate a n-color rainbow palette
I'm trying to generate a rainbow with 15 different colors with ( runnable code here ): size(360,100); colorMode(HSB, 360, 100, 100); // Hue in degrees in [0, 360], // saturation/brightness in [0, 100] // like in Photoshop noStroke(); for (int i = 0; i < 15; i++) { fill(i*24, 100, 100); // 24*15 = 360 rect(i*24, 0, 25, 100); } but it doesn't produce a rich 15 rainbow-color palette, instead some colors are missing (vivid yellow for example). Is there a well known algorithm to produce a vivid rainbow color palette? To understand what's going on, try creating a program that shows a line for each