code: func styleFromTag(fgColor, bgColor, attributes string, tagSubstrings []string) (newFgColor, newBgColor, newAttributes string) {
  	if tagSubstrings[colorForegroundPos] != "" {
  		color := tagSubstrings[colorForegroundPos]
  		if color == "-" {
  			fgColor = "-"
  		} else if color != "" {
  			fgColor = color
  		}
  	}
  
  	if tagSubstrings[colorBackgroundPos-1] != "" {
  		color := tagSubstrings[colorBackgroundPos]
  		if color == "-" {
  			bgColor = "-"
  		} else if color != "" {
  			bgColor = color
  		}
  	}
  
  	if tagSubstrings[colorFlagPos-1] != "" {
  		flags := tagSubstrings[colorFlagPos]
  		if flags == "-" {
  			attributes = "-"
  		} else if flags != "" {
  			attributes = flags
  		}
  	}
  
  	return fgColor, bgColor, attributes
  }
docs: // styleFromTag takes the given style, defined by a foreground color (fgColor),
  // a background color (bgColor), and style attributes, and modifies it based on
  // the substrings (tagSubstrings) extracted by the regular expression for color
  // tags. The new colors and attributes are returned where empty strings mean
  // "don't modify" and a dash ("-") means "reset to default".