func readStyle(runes []rune, defaultStyle Style) Style {
	style := defaultStyle
	split := strings.Split(string(runes), tokenItemSeparator)
	for _, item := range split {
		pair := strings.Split(item, tokenValueSeparator)
		if len(pair) == 2 {
			switch pair[0] {
			case tokenFg:
				style.Fg = StyleParserColorMap[pair[1]]
			case tokenBg:
				style.Bg = StyleParserColorMap[pair[1]]
			case tokenModifier:
				style.Modifier = modifierMap[pair[1]]
			}
		}
	}
	return style
}
readStyle translates an []rune like `fg:red,mod:bold,bg:white` to a style
package termui
import (
	"strings"
)
const (
	tokenFg       = "fg"
	tokenBg       = "bg"
	tokenModifier = "mod"
	tokenItemSeparator  = ","
	tokenValueSeparator = ":"
	tokenBeginStyledText = '['
	tokenEndStyledText   = ']'
	tokenBeginStyle = '('
	tokenEndStyle   = ')'
)
type parserState uint
const (
	parserStateDefault parserState = iota
	parserStateStyleItems
	parserStateStyledText
)
var StyleParserColorMap = map[string]Color{
	"red":     ColorRed,
	"blue":    ColorBlue,
	"black":   ColorBlack,
	"cyan":    ColorCyan,
	"yellow":  ColorYellow,
	"white":   ColorWhite,
	"clear":   ColorClear,
	"green":   ColorGreen,
	"magenta": ColorMagenta,
}
var modifierMap = map[string]Modifier{
	"bold":      ModifierBold,
	"underline": ModifierUnderline,
	"reverse":   ModifierReverse,
}