size(400, 100); background(255); // white background float left_margin = 10; float top_margin = 10; float w = width - left_margin*2; float h = height - top_margin*2; colorMode(HSB, 1); for (int i = 0; i < h; ++i) { float ratio = i/h; float hue = ratio; float saturation = 1; float brightness = 1; stroke( hue, saturation, brightness ); line(left_margin, top_margin+i, left_margin+w, top_margin+i); }