int N = 400; color left = color(232,154,28); // orange color right = color(28,232,73); // lime green size(N, N); for (int x=0; x < N; x++) { float percent = 1.0 * x / N; // force floating-point arithmetic float r = percent * red(left) + (1-percent)*red(right); float g = percent * green(left) + (1-percent)*green(right); float b = percent * blue(left) + (1-percent)*blue(right); stroke(r,g,b); line(x, 0, x, N); } save("colorMix1b.jpg");