colorpatterns

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCharacterWarping added in v0.9.8

func ApplyCharacterWarping(input string) string

func ApplyColorPattern

func ApplyColorPattern(input string, pattern string, method ...ColorizeStyle) string

func ApplyColors

func ApplyColors(input string, patternValues []int, method ...ColorizeStyle) string

func CompileColorPatterns

func CompileColorPatterns()

func DeleteColorPattern added in v0.9.8

func DeleteColorPattern(name string) error

DeleteColorPattern removes a named color pattern from memory and persists the file.

func GetAllColorPatterns added in v0.9.8

func GetAllColorPatterns() map[string][]int

GetAllColorPatterns returns a copy of all loaded color patterns (name → ANSI codes).

func GetColorPatternNames

func GetColorPatternNames() []string

func GetMemoryUsage added in v0.9.8

func GetMemoryUsage() map[string]util.MemoryResult

func IsValidPattern

func IsValidPattern(pName string) bool

func LoadColorPatterns

func LoadColorPatterns()

func SaveColorPattern added in v0.9.8

func SaveColorPattern(name string, colors []int) error

SaveColorPattern adds or replaces a named color pattern in memory and persists the file.

Types

type ColorizeStyle

type ColorizeStyle uint8

TODO: Load patterns from a config file.

var (
	Default ColorizeStyle = 0
	Words   ColorizeStyle = 1
	Once    ColorizeStyle = 2
	Stretch ColorizeStyle = 3

	// Short tags
	ShortTagPatterns = map[string][]string{}
)

Jump to

Keyboard shortcuts

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