My seventh TAD project is a Processing sketch that creates a sort of image map based on colors. To demonstrate, click on the below image. Clicking the blue circle will open one Wikipedia page (in a new window); clicking the red square will open a different Wikipedia page. Note that the links work even though the circle and square intersect. That is because when you click on the image, the sketch retrieves the pixel color at your mouse position; if the color is red, the sketch opens one link; if the color is blue, the sketch opens a different link.
The example here is quite simple, but imagine a sketch that returns esoteric qualities of a color when you select that color from an image of a Tarot card.
Source code:
PImage circleSquare; void setup() { size(170, 100); circleSquare = loadImage("circle_square.png"); } void draw() { background(0); image(circleSquare, 0, 0); } void mousePressed() { int theColor = circleSquare.get(mouseX, mouseY); if(theColor == color(255, 0, 0)) { // red link("http://en.wikipedia.org/wiki/Red_Square", "_new"); } else if(theColor == color(0, 0, 255)) { // blue link("http://en.wikipedia.org/wiki/Blue_Circle_Industries", "_new"); } }