textutil.go
func ColorToString(attr term.Attribute) string {
	var out string

	rawClr := attr & 15
	if rawClr < 8 {
		for k, v := range colorMap {
			if v == rawClr {
				out += k + " "
				break
			}
		}
	}

	if attr&term.AttrBold != 0 {
		out += "bold "
	}
	if attr&term.AttrUnderline != 0 {
		out += "underline "
	}
	if attr&term.AttrReverse != 0 {
		out += "reverse "
	}

	return strings.TrimSpace(out)
}
func ColorToString(attr term.Attribute) string {
	var out string

	rawClr := attr & 15
	if rawClr < 8 {
		for k, v := range colorMap {
			if v == rawClr {
				out += k + " "
				break
			}
		}
	}

	if attr&term.AttrBold != 0 {
		out += "bold "
	}
	if attr&term.AttrUnderline != 0 {
		out += "underline "
	}
	if attr&term.AttrReverse != 0 {
		out += "reverse "
	}

	return strings.TrimSpace(out)
}
func ColorToString ( attr term . Attribute ) string { var out string rawClr := attr & 15 if rawClr < 8 { for k , v := range colorMap { if v == rawClr { out += k + " " break } } } if attr & term . AttrBold != 0 { out += " " } if attr & term . AttrUnderline != 0 { out += " " } if attr & term . AttrReverse != 0 { out += " " } return strings . TrimSpace ( out ) }
// ColorToString returns string representation of the attribute
ColorToString returns string representation of the attribute