-
-
Save jkwok91/c578a803bc37fce99888 to your computer and use it in GitHub Desktop.
colors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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); | |
} | |
} | |
} | |
} |
Author
jkwok91
commented
Apr 3, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment