code: public void setRtfDocument(RtfDocument doc) {
          super.setRtfDocument(doc);
          if(document != null) {
              this.colorNumber = document.getDocumentHeader().getColorNumber(this);
          }
      }
docs: Sets the RtfDocument this RtfColor belongs to
  
  @param doc The RtfDocument to use