We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Blending color (Read 301 times)
Blending color
Jul 24th, 2008, 3:48pm
 
Hi, I've just started using Processing, so please forgive my ignorance.

I have the following, and I'd like for the color of each ring to blend with color of the rings below. I can achieve something similar with opacity, but I'd achieve some sort of subtractive color mixing, a la: http://www.csusm.edu/iits/trc/training/lessons/graphicDesign/d5color1/Subtractive.gif

Here is what I have:

int[] colorVal = { #00aeef, #ec008c, #fff200 }; // set up colors

void setup() {
 
 colorMode(RGB, 225);
 size(800, 800);
 background(225);
 ellipseMode(CENTER);
 translate(400, 400);
 noStroke();
 smooth();

 for (int i = 0; i < 400; i++) {
   for (int x = 0; x < 3; x++) {  
     float a = random(0,10);
     float b = random(0,10);
     noFill();
     stroke(colorVal[x]);
     ellipse(a, b, 2*i , 2*i);
     
   }
 }
}

Any help would be much appreciated.

- Samuel
Re: Blending color
Reply #1 - Jul 24th, 2008, 7:59pm
 
See my reply to another post here:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Exhibition;action=display;num=1216892785;start=2#2
Page Index Toggle Pages: 1