Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Processing function to get a random color set from ColourLovers
void setup() {
size(displayWidth, displayHeight);
int[] colors = getColorLove();
for(float x=0; x<width; x+=random(100)) {
rect(x, 0, width, height);
int[] getColorLove() {
XML xml = loadXML("");
XML[] xcolors = xml.getChild("palette").getChild("colors").getChildren("hex");
int[] colors = new int[xcolors.length];
int i = 0;
for(XML c : xcolors) {
colors[i++] = unhex("FF" + c.getContent());
return colors;

This comment has been minimized.

Copy link
Owner Author

@hamoid hamoid commented May 22, 2016

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