func Underline() StyleOption {
	return func(t *styleComponent) {
		t.style = append(t.style, color.OpUnderscore)
	}
}
Underline sets the text to be underlined.
package glint
import (
	"context"
	"github.com/gookit/color"
)
func Style(inner Component, opts ...StyleOption) Component {
	c := &styleComponent{inner: inner}
	for _, opt := range opts {
		opt(c)
	}
	return c
}
func styleRender(ctx context.Context, v string) string {
	value, _ := ctx.Value(styleCtxKey).([]*styleComponent)
	for _, s := range value {
		v = s.render(v)
	}
	return v
}
type styleComponent struct {
	inner            Component
	fgColor, bgColor colorizer
	style            []color.Color
}
func (c *styleComponent) Body(ctx context.Context) Component {
	old, _ := ctx.Value(styleCtxKey).([]*styleComponent)
	value := make([]*styleComponent, len(old), len(old)+1)
	copy(value, old)
	value = append(value, c)
	return Context(c.inner, styleCtxKey, value)
}
func (c *styleComponent) render(v string) string {
	if c.bgColor != nil {
		v = c.bgColor.Sprint(v)
	}
	if c.fgColor != nil {
		v = c.fgColor.Sprint(v)
	}
	v = color.Style(c.style).Sprint(v)
	return v
}
type styleCtxKeyType struct{}
var styleCtxKey = styleCtxKeyType{}
type StyleOption func(t *styleComponent)
func Color(name string) StyleOption {
	return func(t *styleComponent) {
		if c, ok := color.FgColors[name]; ok {
			t.fgColor = c
		}
		if c, ok := color.ExFgColors[name]; ok {
			t.fgColor = c
		}
	}
}
func ColorHex(v string) StyleOption {
	return func(t *styleComponent) {
		t.fgColor = color.HEX(v)
	}
}
func ColorRGB(r, g, b uint8) StyleOption {
	return func(t *styleComponent) {
		t.fgColor = color.RGB(r, g, b)
	}
}
func BGColor(name string) StyleOption {
	return func(t *styleComponent) {
		if c, ok := color.BgColors[name]; ok {
			t.bgColor = c
		}
		if c, ok := color.ExBgColors[name]; ok {
			t.bgColor = c
		}
	}
}
func BGColorHex(v string) StyleOption {
	return func(t *styleComponent) {
		t.bgColor = color.HEX(v, true)
	}
}
func BGColorRGB(r, g, b uint8) StyleOption {
	return func(t *styleComponent) {
		t.bgColor = color.RGB(r, g, b, true)
	}
}
func Bold() StyleOption {
	return func(t *styleComponent) {
		t.style = append(t.style, color.OpBold)
	}
}
func Italic() StyleOption {
	return func(t *styleComponent) {
		t.style = append(t.style, color.OpItalic)
	}
}