thanks but that's not it.
Here's a example, notice that the blue looks all alike but the alpha goes from 100 to 20.
To be more precise, i'm interested in getting the color that looks alike but then with the lowest alpha value possible.
I call it TColor for now (transparency color).
So a dark blue color could have a TColor that is a bit darker blue and 90% alpha while a light blue color could have a TColor of very dark blue with 80% alpha.
If you run the sketch you know what i mean (got those colors by trying in illustrator).
- int[] c = new color[5];
- void setup() {
- size(500, 500);
- colorMode(RGB, 255, 255, 255, 100);
-
- c[0] = color(209, 235, 249, 100);
- c[1] = color(179, 230, 244, 80);
- c[2] = color(170, 220, 246, 60);
- c[3] = color(131, 208, 242, 40);
- c[4] = color(0, 159, 252, 20);
-
- float rowWidth = width / (float) c.length;
-
- background(255);
-
- fill(255, 0, 0);
- rect(0, height/2, width, height/4);
-
- for(int i = 0; i < c.length; i++) {
- fill(c[i]);
- rect(i*rowWidth, 0, rowWidth, height);
- }
-
- // this is with the alpha disabled
- /*
- for(int i = 0; i < c.length; i++) {
- fill(red(c[i]), green(c[i]), blue(c[i]), 100);
- rect(i*rowWidth, height, rowWidth, -height/8);
- }
- */
-
- }