func New(w io.Writer) *Handler {
	var useColor bool
	if os.Getenv("COLORTERM") != "" {
		useColor = true
	}
	if term := os.Getenv("TERM"); term != "" {
		for _, substring := range colorTermSubstrings {
			if strings.Contains(term, substring) {
				useColor = true
				break
			}
		}
	}
	return &Handler{
		Writer:   w,
		UseColor: useColor,
	}
}
func New(w io.Writer) *Handler {
	var useColor bool
	if os.Getenv("COLORTERM") != "" {
		useColor = true
	}
	if term := os.Getenv("TERM"); term != "" {
		for _, substring := range colorTermSubstrings {
			if strings.Contains(term, substring) {
				useColor = true
				break
			}
		}
	}
	return &Handler{
		Writer:   w,
		UseColor: useColor,
	}
}
// New handler.