Advertisement
Guest User

Untitled

a guest
May 26th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. void setup() {
  2. size(500, 500);
  3. background(255, 0, 0);
  4. }
  5.  
  6. void draw() {
  7. background(255, 0, 0);
  8. fill(0, 0, 255);
  9. ellipse(250, 250, 50, 50);
  10. color myColor = get(mouseX, mouseY);
  11.  
  12.  
  13. if (red(myColor) == 255 && green(myColor) == 0 && blue(myColor) == 0) {
  14. println("it's red");
  15. } else if (red(myColor) == 0 && green(myColor) == 0 && blue(myColor) == 255) {
  16. println("it's blue");
  17. } else {
  18. println("it's something else");
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement