public void setTextColor(final int position, final int length, final Color color) {
    if (!isEmpty()) {
      final int realLength = calculateRealLength(position, length);

      validatePartialLineArguments(position, realLength);

      m_atext.addAttribute(TextAttribute.FOREGROUND, color, position, position + realLength);

      m_textLayout = new TextLayout(m_atext.getIterator(), m_fontContext);
    }
  }
Changes the text color of a part of the line.

@param position The index of the first character that gets the new font color.
@param length Number of characters that get the new font color.
@param color The new text color.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/realizers/ZyLineContent.java