//Orange //This is a program which prints out logos which look like the 'ORANGE' SA logo //The company is a subsidiary of France Telecom //NOTE: I can not get the 'Symbol' font to work correctly or get UNICODE symbols //to display so as a stop gap I am just putting the letters 'tm' as a superscript //Instead of using the actual (tm) symbol (UNICODE: ™) //Orange 1_1 is different because the Random functions for each of the r,g,b values shifts with the changing values in the array int turn = 0; int[] hue= {255,112,0}; void setup() { size(300,480); //Make this the size of the window noStroke(); //No border background(255); //white background framerate(30); //video } void draw() { smooth(); color orange = color(255, 112, 0); //This is a shade of orange color white = color(255, 255, 255); color black = color(0,0,0); PFont orangeFont = loadFont("Futura-Heavy.vlw"); //This is the typeface for the wordmark int fontSize = int(width/6); //This is the font size dependant on the size of the do fill(white); //This is how we clear the text rect(0,300,width,150); int spacer = width/10; //White Space on either side of the square and on the top int textSpacer = width/15; int side = 8 * width/10; //The length of a side of a square //draw the rectangle once fill(hue[0],hue[1],hue[2]); rect(spacer, spacer, side, side); //Text Specs int textXStart = spacer + textSpacer; //Text should start after the spacer and inside the box int textYStart = spacer + side - textSpacer; int tmXStart = side - textSpacer; int tmYStart = textYStart - spacer; //draw the wordMark once fill(white); textFont(orangeFont, fontSize); text("orange", textXStart, textYStart); textFont(orangeFont, fontSize/4); text("TM", tmXStart, tmYStart); //Red Limits int rDown = (-1)*((hue[0])-224); //We don't red to go below 225 int rUp = 256-(hue[0]); //We don't red to go above 256 //Green Limits int gDown = (-1)*((hue[1])-80); //We don't want green to go below 80 int gUp = 220-(hue[1]); //We don't want green to go below 220 //Blue Limits int bDown = (-1)*((hue[2])+1); //We don't want blue to go below 0 int bUp = (80-(hue[2])); //This is the algorithm that changes the colors int x = int(random(-1,3)); int r = int(random(rDown, rUp)); int g = int(random(gDown,gUp)); int b = int(random(bDown,bUp)); int z = int(random(-16,16)); //Modify Red Value if ( x == 0 ) { hue[x] = hue[x]+r; } //Modify Green Value if ( x == 1 ) { hue[x] = hue[x]+g; } //Modify Blue Value if ( x == 2 ) { hue[x] = hue[x]+b; } // Print out the R,G,B values fill(black); textFont(orangeFont, fontSize/2); text( "R " + hue[0] + " G " + hue[1] + " B " + hue[2], 30, 330); }