paints

module
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

README

Paints 🎨

Go Reference Go Report Card GitHub go.mod Go version Release

Toolkit to prettify the output of your golang apps

Features

  • Simple functions to colorize text and backgrounds
  • Text styles: bold, dim, italic, underline
  • Zero runtime dependencies — pure Go implementation
  • Small, well-tested functions suitable for CLI output

Installation

go get github.com/sitnikovik/paints

Getting started

package main

import (
    "fmt"

    bg "github.com/sitnikovik/paints/color/background"
    color "github.com/sitnikovik/paints/color/text"
    style "github.com/sitnikovik/paints/style/text"
)

func main() {
    // Print text with red background
    s := bg.Red("Lorem ipsum")
    fmt.Println(s)

    // Print green bold text
    s = color.Green(style.Bold("Lorem ipsum"))
    fmt.Println(s)
}

Documentation

Full API reference is available on pkg.go.dev

Requirements

  • Go 1.23.4 (as declared in go.mod) — newer Go versions should work
  • No external runtime dependencies

Contributing

Contributions are welcome. Suggested workflow:

  1. Pick an open issue and work on it. Open a Pull Request that references the issue when you're ready
  2. If there is no suitable issue for your idea, either open a short issue describing the proposal or contact me (watch my bio) and we will create an issue for you.
  3. Fork the repository and create a feature branch: git checkout -b feature/name
  4. Run and add tests for new behavior: go test ./...
  5. Commit changes with a descriptive message and open a Pull Request
  6. Follow the repository's code style and linters (we use golangci-lint)
  7. If the PR passes, we merge it and create version via GitHub releases

Please open an issue to discuss large or breaking changes before implementing.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Author / Contact

Maintained by Ilya Sitnikov

Directories

Path Synopsis
color
background
Package background provides ANSI background color functions.
Package background provides ANSI background color functions.
text
Package text provides ANSI text color functions.
Package text provides ANSI text color functions.
internal
ansi
Package ansi defines ANSI codes.
Package ansi defines ANSI codes.
ansi/color/background
Package background defines ANSI background color codes.
Package background defines ANSI background color codes.
ansi/color/text
Package text defines ANSI text color codes.
Package text defines ANSI text color codes.
ansi/style/text
Package text defines ANSI text style codes.
Package text defines ANSI text style codes.
style
text
Package text provides ANSI text style functions.
Package text provides ANSI text style functions.

Jump to

Keyboard shortcuts

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