Versions in this module Expand all Collapse all v1 v1.0.3 Jul 24, 2026 v1.0.2 Jul 23, 2026 v1.0.1 Jul 23, 2026 v1.0.0 Jul 23, 2026 Changes in this version + const Black + const Blue + const BrightBlack + const BrightBlue + const BrightCyan + const BrightGreen + const BrightMagenta + const BrightRed + const BrightWhite + const BrightYellow + const Cyan + const Green + const Magenta + const NBSP + const NoTabConversion + const Red + const UnderlineCurly + const UnderlineDashed + const UnderlineDotted + const UnderlineDouble + const UnderlineNone + const UnderlineSingle + const White + const Yellow + var Writer = colorprofile.NewWriter(os.Stdout, os.Environ()) + func Alpha(c color.Color, alpha float64) color.Color + func BackgroundColor(in term.File, out term.File) (bg color.Color, err error) + func Blend1D(steps int, stops ...color.Color) []color.Color + func Blend2D(width, height int, angle float64, stops ...color.Color) []color.Color + func Color(s string) color.Color + func Complementary(c color.Color) color.Color + func Darken(c color.Color, percent float64) color.Color + func EnableLegacyWindowsANSI(*os.File) — darwin/amd64, js/wasm, linux/amd64 + func EnableLegacyWindowsANSI(f *os.File) — windows/amd64 + func Fprint(w io.Writer, v ...any) (int, error) + func Fprintf(w io.Writer, format string, v ...any) (int, error) + func Fprintln(w io.Writer, v ...any) (int, error) + func HasDarkBackground(in term.File, out term.File) bool + func Height(str string) int + func JoinHorizontal(pos Position, strs ...string) string + func JoinVertical(pos Position, strs ...string) string + func Lighten(c color.Color, percent float64) color.Color + func Place(width, height int, hPos, vPos Position, str string, opts ...WhitespaceOption) string + func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOption) string + func PlaceVertical(height int, pos Position, str string, opts ...WhitespaceOption) string + func Print(v ...any) (int, error) + func Printf(format string, v ...any) (int, error) + func Println(v ...any) (int, error) + func Size(str string) (width, height int) + func Sprint(v ...any) string + func Sprintf(format string, v ...any) string + func Sprintln(v ...any) string + func StyleRanges(s string, ranges ...Range) string + func StyleRunes(str string, indices []int, matched, unmatched Style) string + func Width(str string) (width int) + func Wrap(s string, width int, breakpoints string) string + type ANSIColor = ansi.IndexedColor + type Border struct + Bottom string + BottomLeft string + BottomRight string + Left string + Middle string + MiddleBottom string + MiddleLeft string + MiddleRight string + MiddleTop string + Right string + Top string + TopLeft string + TopRight string + func ASCIIBorder() Border + func BlockBorder() Border + func DoubleBorder() Border + func HiddenBorder() Border + func InnerHalfBlockBorder() Border + func MarkdownBorder() Border + func NormalBorder() Border + func OuterHalfBlockBorder() Border + func RoundedBorder() Border + func ThickBorder() Border + func (b Border) GetBottomSize() int + func (b Border) GetLeftSize() int + func (b Border) GetRightSize() int + func (b Border) GetTopSize() int + type Canvas struct + func NewCanvas(width, height int) *Canvas + func (c *Canvas) Bounds() uv.Rectangle + func (c *Canvas) CellAt(x int, y int) *uv.Cell + func (c *Canvas) Clear() + func (c *Canvas) Compose(drawer uv.Drawable) *Canvas + func (c *Canvas) Draw(scr uv.Screen, area uv.Rectangle) + func (c *Canvas) Height() int + func (c *Canvas) Render() string + func (c *Canvas) Resize(width, height int) + func (c *Canvas) SetCell(x int, y int, cell *uv.Cell) + func (c *Canvas) Width() int + func (c *Canvas) WidthMethod() uv.WidthMethod + type CompleteFunc func(ansi, ansi256, truecolor color.Color) color.Color + func Complete(p colorprofile.Profile) CompleteFunc + type Compositor struct + func NewCompositor(layers ...*Layer) *Compositor + func (c *Compositor) AddLayers(layers ...*Layer) *Compositor + func (c *Compositor) Bounds() image.Rectangle + func (c *Compositor) Draw(scr uv.Screen, area image.Rectangle) + func (c *Compositor) GetLayer(id string) *Layer + func (c *Compositor) Hit(x, y int) LayerHit + func (c *Compositor) Refresh() + func (c *Compositor) Render() string + type Layer struct + func NewLayer(content string, layers ...*Layer) *Layer + func (l *Layer) AddLayers(layers ...*Layer) *Layer + func (l *Layer) Draw(scr uv.Screen, area uv.Rectangle) + func (l *Layer) GetContent() string + func (l *Layer) GetID() string + func (l *Layer) GetLayer(id string) *Layer + func (l *Layer) GetX() int + func (l *Layer) GetY() int + func (l *Layer) GetZ() int + func (l *Layer) Height() int + func (l *Layer) ID(id string) *Layer + func (l *Layer) MaxZ() int + func (l *Layer) Width() int + func (l *Layer) X(x int) *Layer + func (l *Layer) Y(y int) *Layer + func (l *Layer) Z(z int) *Layer + type LayerHit struct + func (lh LayerHit) Bounds() image.Rectangle + func (lh LayerHit) Empty() bool + func (lh LayerHit) ID() string + func (lh LayerHit) Layer() *Layer + type LightDarkFunc func(light, dark color.Color) color.Color + func LightDark(isDark bool) LightDarkFunc + type NoColor struct + func (n NoColor) RGBA() (r, g, b, a uint32) + type Position float64 + const Bottom + const Center + const Left + const Right + const Top + type RGBColor struct + B uint8 + G uint8 + R uint8 + func (c RGBColor) RGBA() (r, g, b, a uint32) + type Range struct + End int + Start int + Style Style + func NewRange(start, end int, style Style) Range + type Style struct + func NewStyle() Style + func (s Style) Align(p ...Position) Style + func (s Style) AlignHorizontal(p Position) Style + func (s Style) AlignVertical(p Position) Style + func (s Style) Background(c color.Color) Style + func (s Style) Blink(v bool) Style + func (s Style) Bold(v bool) Style + func (s Style) Border(b Border, sides ...bool) Style + func (s Style) BorderBackground(c ...color.Color) Style + func (s Style) BorderBottom(v bool) Style + func (s Style) BorderBottomBackground(c color.Color) Style + func (s Style) BorderBottomForeground(c color.Color) Style + func (s Style) BorderForeground(c ...color.Color) Style + func (s Style) BorderForegroundBlend(c ...color.Color) Style + func (s Style) BorderForegroundBlendOffset(v int) Style + func (s Style) BorderLeft(v bool) Style + func (s Style) BorderLeftBackground(c color.Color) Style + func (s Style) BorderLeftForeground(c color.Color) Style + func (s Style) BorderRight(v bool) Style + func (s Style) BorderRightBackground(c color.Color) Style + func (s Style) BorderRightForeground(c color.Color) Style + func (s Style) BorderStyle(b Border) Style + func (s Style) BorderTop(v bool) Style + func (s Style) BorderTopBackground(c color.Color) Style + func (s Style) BorderTopForeground(c color.Color) Style + func (s Style) ColorWhitespace(v bool) Style + func (s Style) Copy() Style + func (s Style) Faint(v bool) Style + func (s Style) Foreground(c color.Color) Style + func (s Style) GetAlign() Position + func (s Style) GetAlignHorizontal() Position + func (s Style) GetAlignVertical() Position + func (s Style) GetBackground() color.Color + func (s Style) GetBlink() bool + func (s Style) GetBold() bool + func (s Style) GetBorder() (b Border, top, right, bottom, left bool) + func (s Style) GetBorderBottom() bool + func (s Style) GetBorderBottomBackground() color.Color + func (s Style) GetBorderBottomForeground() color.Color + func (s Style) GetBorderBottomSize() int + func (s Style) GetBorderForegroundBlend() []color.Color + func (s Style) GetBorderForegroundBlendOffset() int + func (s Style) GetBorderLeft() bool + func (s Style) GetBorderLeftBackground() color.Color + func (s Style) GetBorderLeftForeground() color.Color + func (s Style) GetBorderLeftSize() int + func (s Style) GetBorderRight() bool + func (s Style) GetBorderRightBackground() color.Color + func (s Style) GetBorderRightForeground() color.Color + func (s Style) GetBorderRightSize() int + func (s Style) GetBorderStyle() Border + func (s Style) GetBorderTop() bool + func (s Style) GetBorderTopBackground() color.Color + func (s Style) GetBorderTopForeground() color.Color + func (s Style) GetBorderTopSize() int + func (s Style) GetBorderTopWidth() int + func (s Style) GetColorWhitespace() bool + func (s Style) GetFaint() bool + func (s Style) GetForeground() color.Color + func (s Style) GetFrameSize() (x, y int) + func (s Style) GetHeight() int + func (s Style) GetHorizontalBorderSize() int + func (s Style) GetHorizontalFrameSize() int + func (s Style) GetHorizontalMargins() int + func (s Style) GetHorizontalPadding() int + func (s Style) GetHyperlink() (link, params string) + func (s Style) GetInline() bool + func (s Style) GetItalic() bool + func (s Style) GetMargin() (top, right, bottom, left int) + func (s Style) GetMarginBottom() int + func (s Style) GetMarginChar() rune + func (s Style) GetMarginLeft() int + func (s Style) GetMarginRight() int + func (s Style) GetMarginTop() int + func (s Style) GetMaxHeight() int + func (s Style) GetMaxWidth() int + func (s Style) GetPadding() (top, right, bottom, left int) + func (s Style) GetPaddingBottom() int + func (s Style) GetPaddingChar() rune + func (s Style) GetPaddingLeft() int + func (s Style) GetPaddingRight() int + func (s Style) GetPaddingTop() int + func (s Style) GetReverse() bool + func (s Style) GetStrikethrough() bool + func (s Style) GetStrikethroughSpaces() bool + func (s Style) GetTabWidth() int + func (s Style) GetTransform() func(string) string + func (s Style) GetUnderline() bool + func (s Style) GetUnderlineColor() color.Color + func (s Style) GetUnderlineSpaces() bool + func (s Style) GetUnderlineStyle() Underline + func (s Style) GetVerticalBorderSize() int + func (s Style) GetVerticalFrameSize() int + func (s Style) GetVerticalMargins() int + func (s Style) GetVerticalPadding() int + func (s Style) GetWidth() int + func (s Style) Height(i int) Style + func (s Style) Hyperlink(link string, params ...string) Style + func (s Style) Inherit(i Style) Style + func (s Style) Inline(v bool) Style + func (s Style) Italic(v bool) Style + func (s Style) Margin(i ...int) Style + func (s Style) MarginBackground(c color.Color) Style + func (s Style) MarginBottom(i int) Style + func (s Style) MarginChar(r rune) Style + func (s Style) MarginLeft(i int) Style + func (s Style) MarginRight(i int) Style + func (s Style) MarginTop(i int) Style + func (s Style) MaxHeight(n int) Style + func (s Style) MaxWidth(n int) Style + func (s Style) Padding(i ...int) Style + func (s Style) PaddingBottom(i int) Style + func (s Style) PaddingChar(r rune) Style + func (s Style) PaddingLeft(i int) Style + func (s Style) PaddingRight(i int) Style + func (s Style) PaddingTop(i int) Style + func (s Style) Render(strs ...string) string + func (s Style) Reverse(v bool) Style + func (s Style) SetString(strs ...string) Style + func (s Style) Strikethrough(v bool) Style + func (s Style) StrikethroughSpaces(v bool) Style + func (s Style) String() string + func (s Style) TabWidth(n int) Style + func (s Style) Transform(fn func(string) string) Style + func (s Style) Underline(v bool) Style + func (s Style) UnderlineColor(c color.Color) Style + func (s Style) UnderlineSpaces(v bool) Style + func (s Style) UnderlineStyle(u Underline) Style + func (s Style) UnsetAlign() Style + func (s Style) UnsetAlignHorizontal() Style + func (s Style) UnsetAlignVertical() Style + func (s Style) UnsetBackground() Style + func (s Style) UnsetBlink() Style + func (s Style) UnsetBold() Style + func (s Style) UnsetBorderBackground() Style + func (s Style) UnsetBorderBottom() Style + func (s Style) UnsetBorderBottomBackground() Style + func (s Style) UnsetBorderBottomForeground() Style + func (s Style) UnsetBorderForeground() Style + func (s Style) UnsetBorderForegroundBlend() Style + func (s Style) UnsetBorderForegroundBlendOffset() Style + func (s Style) UnsetBorderLeft() Style + func (s Style) UnsetBorderLeftBackground() Style + func (s Style) UnsetBorderLeftForeground() Style + func (s Style) UnsetBorderRight() Style + func (s Style) UnsetBorderRightBackground() Style + func (s Style) UnsetBorderRightForeground() Style + func (s Style) UnsetBorderStyle() Style + func (s Style) UnsetBorderTop() Style + func (s Style) UnsetBorderTopBackground() Style + func (s Style) UnsetBorderTopBackgroundColor() Style + func (s Style) UnsetBorderTopForeground() Style + func (s Style) UnsetColorWhitespace() Style + func (s Style) UnsetFaint() Style + func (s Style) UnsetForeground() Style + func (s Style) UnsetHeight() Style + func (s Style) UnsetHyperlink() Style + func (s Style) UnsetInline() Style + func (s Style) UnsetItalic() Style + func (s Style) UnsetMarginBackground() Style + func (s Style) UnsetMarginBottom() Style + func (s Style) UnsetMarginLeft() Style + func (s Style) UnsetMarginRight() Style + func (s Style) UnsetMarginTop() Style + func (s Style) UnsetMargins() Style + func (s Style) UnsetMaxHeight() Style + func (s Style) UnsetMaxWidth() Style + func (s Style) UnsetPadding() Style + func (s Style) UnsetPaddingBottom() Style + func (s Style) UnsetPaddingChar() Style + func (s Style) UnsetPaddingLeft() Style + func (s Style) UnsetPaddingRight() Style + func (s Style) UnsetPaddingTop() Style + func (s Style) UnsetReverse() Style + func (s Style) UnsetStrikethrough() Style + func (s Style) UnsetStrikethroughSpaces() Style + func (s Style) UnsetString() Style + func (s Style) UnsetTabWidth() Style + func (s Style) UnsetTransform() Style + func (s Style) UnsetUnderline() Style + func (s Style) UnsetUnderlineSpaces() Style + func (s Style) UnsetWidth() Style + func (s Style) Value() string + func (s Style) Width(i int) Style + type Underline = ansi.Underline + type WhitespaceOption func(*whitespace) + func WithWhitespaceChars(s string) WhitespaceOption + func WithWhitespaceStyle(s Style) WhitespaceOption + type WrapWriter struct + func NewWrapWriter(w io.Writer) *WrapWriter + func (w *WrapWriter) Close() error + func (w *WrapWriter) Link() uv.Link + func (w *WrapWriter) Style() uv.Style + func (w *WrapWriter) Write(p []byte) (int, error)