Stop
Continue
Go
/* Random Circles This example draws 20 circles of radius 10 in random locations with random fill colors. We use an array to limit the possible colors. */ /* The array theColors will hold the colors that we will randomly select from. The array is declared outside of all of our functions so that it is available everywhere. */ var theColors=['gray', 'blue', 'lightblue', 'darkblue', 'slateblue', 'lightgray']; function setup(){ //no special setup needed } function draw(){ var i; //index for for loop var x,y; //variables for circle center var c; //variable for color for (i=0;i<20;i=i+1){ //i=0,1,...20 //get a random entry from theColors c=theColors.random(); fillcolor(c); //set fillcolor x=width*random(); //random x value y=height*random(); //random y value circle(x,y,10); //circle of radius 10 fill(); } }
default
3024-day
3024-night
ambiance
base16-dark
base16-light
blackboard
cobalt
eclipse
elegant
erlang-dark
lesser-dark
mbo
mdn-like
midnight
monokai
neat
night
paraiso-dark
paraiso-light
pastel-on-dark
rubyblue
solarized dark
solarized light
the-matrix
tomorrow-night-eighties
twilight
vibrant-ink
xq-dark
xq-light