text

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package text provides ANSI text color functions.

Each function wraps the input string with ANSI escape codes for the specified color and automatically appends a reset code.

Example

Example shows basic usage of text color functions.

package main

import (
	"fmt"

	"github.com/sitnikovik/paints/color/text"
)

func main() {
	fmt.Println(text.Red("Error message"))
	fmt.Println(text.Green("Success"))
	fmt.Println(text.Blue("Information"))
}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(s string) string

Blue returns a new string with blue text.

Wraps the provided string with ANSI codes on the left and right.

func Cyan

func Cyan(s string) string

Cyan returns a new string with cyan text.

Wraps the provided string with ANSI codes on the left and right.

func Green

func Green(s string) string

Green returns a new string with green text.

Wraps the provided string with ANSI codes on the left and right.

func Purple

func Purple(s string) string

Purple returns a new string with purple text.

Wraps the provided string with ANSI codes on the left and right.

func Red

func Red(s string) string

Red returns a new string with red text.

Wraps the provided string with ANSI codes on the left and right.

func Yellow

func Yellow(s string) string

Yellow returns a new string with yellow text.

Wraps the provided string with ANSI codes on the left and right.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL