code: public int getColorNumber(RtfColor color) {
          int colorIndex = -1;
          for(int i = 0; i < colorList.size(); i++) {
              if(colorList.get(i).equals(color)) {
                  colorIndex = i;
              }
          }
          if(colorIndex == -1) {
              colorIndex = colorList.size();
              colorList.add(color);
          }
          return colorIndex;
      }
docs: Returns the index of the given RtfColor in the color list. If the RtfColor
  is not in the list of colors, then it is added.
  
  @param color The RtfColor for which to get the index
  @return The index of the RtfColor