docs: public double getColorPercentage(Area node)
      {
          int tlen = 0;
          double sum = 0;
          
      	for (Box box : node.getBoxes())
      	{
      		int len = letterLength(box.getText());
      		if (len > 0)
      		{
      			sum += getColorPercentage(box.getColor()) * len;
      			tlen += len;
      		}
      	}
          
          for (int i = 0; i < node.getChildCount(); i++)
          {
              Area child = node.getChildAt(i);
              int nlen = letterLength(child.getText());
              tlen += nlen;
              sum += getColorPercentage(child) * nlen;
          }
          if (tlen == 0)
              return 0;
          else
              return sum / tlen;
      }