Skip to content

Instantly share code, notes, and snippets.

@jkwok91
Created April 20, 2014 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkwok91/c578a803bc37fce99888 to your computer and use it in GitHub Desktop.
Save jkwok91/c578a803bc37fce99888 to your computer and use it in GitHub Desktop.
colors
/*
no takebacksies in my kingdom
*/
int unit, block;
void setup() {
size(500, 500);
background(255);
unit = 20;
block = 2*unit;
noLoop();
}
void draw() {
blox();
}
void blox() {
color c;
for (int h = 0; h < height/block; h++) {
for (int w = 0; w < width/block; w++) {
for (int s = 0; s < 7; s++) {
c = color(w*block, s*unit, s*block);
noStroke();
fill(c, block);
rect((w*5*unit), h*(5*unit), unit*s, unit*s);
}
}
}
}
@jkwok91
Copy link
Author

jkwok91 commented Apr 3, 2016

screen shot 2016-04-02 at 6 16 10 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment