code: func (p *ColorParser) NextElement() TextElement {
  	if p.index >= len(p.text) {
  		return TextElement{Type: ElemEndOfText}
  	}
  
  	if p.text[p.index] == '\n' {
  		p.index++
  		return TextElement{Type: ElemLineBreak}
  	}
  
  	if p.text[p.index] != '<' {
  		p.index++
  		return TextElement{Type: ElemPrintable, Ch: p.text[p.index-1], Fg: p.currText, Bg: p.currBack}
  	}
  
  	attr, atype, ok := p.parseColor()
  	if !ok {
  		p.index++
  		return TextElement{Type: ElemPrintable, Ch: p.text[p.index-1], Fg: p.currText, Bg: p.currBack}
  	}
  
  	if atype == ElemBackColor {
  		if attr == ColorDefault {
  			p.currBack = p.defBack
  		} else {
  			p.currBack = attr
  		}
  	} else if atype == ElemTextColor {
  		if attr == ColorDefault {
  			p.currText = p.defText
  		} else {
  			p.currText = attr
  		}
  	}
  	return TextElement{Type: atype, Fg: p.currText, Bg: p.currBack}
  }
docs: // NextElement parses and returns the next string element