Documentation
¶
Overview ¶
Package tcellx provides extensions to github.com/gdamore/tcell/v2 package.
Index ¶
- func ColorID(c Color) string
- type AdaptiveColor
- type AdaptiveColorBuilder
- func (c AdaptiveColorBuilder) Resolve(provider termcap.Provider) Color
- func (b AdaptiveColorBuilder) Result() AdaptiveColor
- func (b AdaptiveColorBuilder) WithANSI(c Color) AdaptiveColorBuilder
- func (b AdaptiveColorBuilder) WithANSI256(c Color) AdaptiveColorBuilder
- func (b AdaptiveColorBuilder) WithLightANSI(c Color) AdaptiveColorBuilder
- func (b AdaptiveColorBuilder) WithLightANSI256(c Color) AdaptiveColorBuilder
- func (b AdaptiveColorBuilder) WithLightRGB(c Color) AdaptiveColorBuilder
- func (b AdaptiveColorBuilder) WithRGB(c Color) AdaptiveColorBuilder
- type Color
- type Style
- func (s Style) Apply(base tcell.Style) tcell.Style
- func (s Style) String() string
- func (s Style) WithAttrs(attrs tcell.AttrMask) Style
- func (s Style) WithBackground(c Color) Style
- func (s Style) WithBlink(on bool) Style
- func (s Style) WithBold(on bool) Style
- func (s Style) WithDim(on bool) Style
- func (s Style) WithForeground(c Color) Style
- func (s Style) WithItalic(on bool) Style
- func (s Style) WithReverse(on bool) Style
- func (s Style) WithStrikeThrough(on bool) Style
- func (s Style) WithURL(url string) Style
- func (s Style) WithURLID(urlID string) Style
- func (s Style) WithUnderline(on bool) Style
- func (s Style) WithoutAttrs(attrs tcell.AttrMask) Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdaptiveColor ¶
AdaptiveColor represents a color that adapts to the terminal color profile.
type AdaptiveColorBuilder ¶
type AdaptiveColorBuilder struct {
// contains filtered or unexported fields
}
AdaptiveColorBuilder is a builder for adaptive colors.
func NewAdaptiveColor ¶
func NewAdaptiveColor(c Color) AdaptiveColorBuilder
NewAdaptiveColor creates a new adaptive color builder.
func (AdaptiveColorBuilder) Result ¶
func (b AdaptiveColorBuilder) Result() AdaptiveColor
Result returns the resulting adaptive color.
func (AdaptiveColorBuilder) WithANSI ¶
func (b AdaptiveColorBuilder) WithANSI(c Color) AdaptiveColorBuilder
WithANSI sets the ANSI color for both dark and light modes.
func (AdaptiveColorBuilder) WithANSI256 ¶
func (b AdaptiveColorBuilder) WithANSI256(c Color) AdaptiveColorBuilder
WithANSI256 sets the ANSI 256 color for both dark and light modes.
func (AdaptiveColorBuilder) WithLightANSI ¶
func (b AdaptiveColorBuilder) WithLightANSI(c Color) AdaptiveColorBuilder
WithLightANSI sets the ANSI color for light mode.
func (AdaptiveColorBuilder) WithLightANSI256 ¶
func (b AdaptiveColorBuilder) WithLightANSI256(c Color) AdaptiveColorBuilder
WithLightANSI256 sets the ANSI 256 color for light mode.
func (AdaptiveColorBuilder) WithLightRGB ¶
func (b AdaptiveColorBuilder) WithLightRGB(c Color) AdaptiveColorBuilder
WithLightRGB sets the RGB color for light mode.
func (AdaptiveColorBuilder) WithRGB ¶
func (b AdaptiveColorBuilder) WithRGB(c Color) AdaptiveColorBuilder
WithRGB sets the RGB color for both dark and light modes.
type Color ¶
type Color = tcell.Color
Color represents a color in the terminal.
func ANSIExtendedColor ¶
ANSIExtendedColor returns the nearest ANSI 256 color for the given color excluding basic 16 ANSI colors.
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
Style represents a style in the terminal.
func (Style) Apply ¶
func (s Style) Apply(base tcell.Style) tcell.Style
Apply applies the style to the base style.
func (Style) WithBackground ¶
WithBackground sets the background color.
func (Style) WithForeground ¶
WithForeground sets the foreground color.
func (Style) WithItalic ¶
WithItalic sets or removes the italic attribute.
func (Style) WithReverse ¶
WithReverse sets or removes the reverse attribute.
func (Style) WithStrikeThrough ¶
WithStrikeThrough sets or removes the strike-through attribute.
func (Style) WithUnderline ¶
WithUnderline sets or removes the underline attribute.
func (Style) WithoutAttrs ¶
WithoutAttrs removes the attributes.
Directories
¶
Path | Synopsis |
---|---|
Package termcap provides an interface for querying terminal capabilities.
|
Package termcap provides an interface for querying terminal capabilities. |
termenvcap
module
|