Haig Armen Educational Archive


Exercise 15

by Haig. Average Reading Time: less than a minute.

Rainbows in a different colour mode


void setup() {
  size(300, 300);
  background(#04B1CE);
  noFill();
  colorMode(HSB);
}

void draw() {
  strokeWeight(random(3, 10));
  stroke(random(255), 255, 255); // HSB Hue Saturation Brightness
  float rainbow_size = random(200, 270);
  ellipse(150, 350, rainbow_size, rainbow_size);
}

No comments on ‘Exercise 15’

Leave a Reply