Skip to content

Instantly share code, notes, and snippets.

@slambert
Last active February 9, 2017 14:12
Show Gist options
  • Save slambert/6ba843f4d84af4bf1fad579e812e0a30 to your computer and use it in GitHub Desktop.
Save slambert/6ba843f4d84af4bf1fad579e812e0a30 to your computer and use it in GitHub Desktop.
One way you can use color palettes in a sketch
/*
Color Palette example sketch
Steve Lambert 2017-02-09
*/
// My Pallette
// Taken from https://color.adobe.com/Aspirin-C-color-theme-251864/edit/?copy=true
color darkBlue = color(34,83,120);
color medBlue = color(22,149,163);
color lightBlue = color(172,240,242);
color offWhite = color(243,255,226);
color orange = color(235,127,0);
// other variables
int circleWidth = 50;
void setup() {
size(1000, 200);
background(offWhite);
noStroke();
}
void draw() {
background(offWhite);
fill(darkBlue);
ellipse(width/5*4, height/2, circleWidth, circleWidth);
fill(medBlue);
ellipse(width/5*3, height/2, circleWidth, circleWidth);
fill(lightBlue);
ellipse(width/5*2, height/2, circleWidth, circleWidth);
fill(orange);
ellipse(width/5*1, height/2, circleWidth, circleWidth);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment