/**
* Choose from 3 to 7 colors from CIE Lab or Lch with different graphic tools.
* Copy from Perceptual Colorpicker and paste where you want in your sketch.
* You will get the following pattern :
* //******************** Perceptual ColorPicker colors ********************
* color[] pcpColors = new color[x];
* pcpColors[0] =#hhhhhh;
* pcpColors[1] =#hhhhhh;
* pcpColors[2] =#hhhhhh;
* ...
* pcpColors[x] =#hhhhhh;
*
* (c) 2018
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* @author Olivier Vicario https://www.perceptualcolor.org
* @modified 01/21/2018
* @version 1.0.0
*/
import java.util.Calendar;
void setup() {
//******************** Perceptual ColorPicker colors ********************
color[] pcpColors = new color[5];
pcpColors[0] =#df5780;
pcpColors[1] =#c394d7;
pcpColors[2] =#61899b;
pcpColors[3] =#535421;
pcpColors[4] =#8e3b12;
size(430, 605);
background(255);
noStroke();
int pas = 10;
int size = 430/pas;
for (int i=size/2; i<430-size/2; i+=size) {
for (int j=size/2; j<430-size/2; j+=size) {
if((int)random(10)>1){
fill(pcpColors[(int)random(pcpColors.length)]);
ellipse(i, j, 430/pas, 430/pas);
}
}
}
int n = pcpColors.length;
float width = 430/(n+(n-1)*0.1);
for(int i=0;i