name
getPageColor ( )
import prohtml.*;

HtmlTree htmlTree;
int numbOfColors,stripeWidth;

void setup(){
  //enter your url here
  htmlTree = new HtmlTree("http://www.yoururl.com");

  numbOfColors = htmlTree.getNumbOfColors();
  stripeWidth = width/numbOfColors;
}

void draw(){
  if(!(numbOfColors < 1)){
    int stripeWidth = width/numbOfColors;
    for (int i = 0;i<numbOfColors;i++){
      noStroke();
      fill(htmlTree.getPageColor(i));
      rect(i*stripeWidth,0,stripeWidth,height);
    }
  }else{
    println("no color in html code");
  }
}
description
GetPageColor gives you a specified color of an HtmlPage. Use getNumbOfColors to get the number of found colors.
syntax
getPageColor(value);
parameters
value
int, the number of the color you want to be returned
returns
color, the color for the given value
usage
Web & Application
related