Skip to content

Instantly share code, notes, and snippets.

@ff6347
Forked from josues/color-map.js
Created December 12, 2016 11:31
Show Gist options
  • Select an option

  • Save ff6347/afb81df947a3ecf7c05d07e9d2943220 to your computer and use it in GitHub Desktop.

Select an option

Save ff6347/afb81df947a3ecf7c05d07e9d2943220 to your computer and use it in GitHub Desktop.
Hour-of-Code_Color_JP
var a = 0;
var b = 0;
var c = 0;
function setup() {
createCanvas(500, 500);
background(255);
noStroke();
colorMode(HSB);
var s = random(440, 450);
noiseSeed(s);
a = noise(s);
b = noise(s);
var xs = a;
for (var x = 0; x <= width; x++) {
b += 0.01;
c += 0.0005;
a = xs;
for (var y = 0; y <= height; y++) {
a += 0.005;
var h = noise(a, b, c)*10;
fill(255/h*3, 255, 255);
rect(x*5, y*5, h, h);
}
}
//print(n)
//print(h)
}
function draw() {
}
function mousePressed(){
save('image.jpg');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment