An ANSI colour terminal package for Go

Overview

colourize

GoDoc Build Status Coverage Status Go Report Card

An ANSI colour terminal package for Go. Supports all ANSI colours and emphasis. Not compatible with Windows systems.

Installation

 go get github.com/TreyBastian/colourize 

Usage

package main
import (
    c "github.com/TreyBastian/colourize"
    "fmt"
)

func main() {
  fmt.Println(c.Colourize("Hello World!", c.Green, c.Whitebg, c.Bold))
}

Projects Using colourize

You might also like...
Terminal string styling for go done right, with full and painless Windows 10 support.
Terminal string styling for go done right, with full and painless Windows 10 support.

GChalk GChalk is a library heavily inspired by chalk, the popular Node.js terminal color library, and using go ports of supports-color and ansi-styles

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Minimalist Go package aimed at creating Console User Interfaces.
Minimalist Go package aimed at creating Console User Interfaces.

GOCUI - Go Console User Interface Minimalist Go package aimed at creating Console User Interfaces. Features Minimalist API. Views (the "windows" in th

Repaint images by sorting pixels by colour
Repaint images by sorting pixels by colour

Every Frame A Painting Sorts pixels in an image by colour and redraws the image

Draw images in your ANSI terminal with true color
Draw images in your ANSI terminal with true color

___ _____ ____ / _ \/ _/ |/_/ /____ ______ _ Made with love by Eliuk Blau / ___// /_ / __/ -_) __/ ' \ https://github.com/eliukblau/pix

Advanced ANSI style & color support for your terminal applications
Advanced ANSI style & color support for your terminal applications

termenv lets you safely use advanced styling options on the terminal. It gathers information about the terminal environment in terms of its ANSI & col

a tool to output images as RGB ANSI graphics on the terminal
a tool to output images as RGB ANSI graphics on the terminal

imgcat Tool to output images in the terminal. Built with bubbletea install homebrew brew install trashhalo/homebrew-brews/imgcat prebuilt packages Pr

Generate ANSI-/Ascii-art version images/Gifs in your terminal.
Generate ANSI-/Ascii-art version images/Gifs in your terminal.

ANSI-Art NOTE: This toy project is not yet finished. ANSI-version Logo Block ANSI-version Logo ASCII-version Logo Support Platform You are kindly remi

Golang terminal ANSI OSC52 wrapper. Copy text to clipboard from anywhere.

go-osc52 A terminal Go library to copy text to clipboard from anywhere. It does so using ANSI OSC52. The Copy() function defaults to copying text from

Golang ultimate ANSI-colors that supports Printf/Sprintf methods
Golang ultimate ANSI-colors that supports Printf/Sprintf methods

Aurora Ultimate ANSI colors for Golang. The package supports Printf/Sprintf etc. TOC Installation Usage Simple Printf aurora.Sprintf Enable/Disable co

Simple ANSi to PNG converter written in pure Go

AnsiGo Description AnsiGo is a simple ANSi to PNG converter written in pure Go. It converts files containing ANSi sequences (.ANS) into PNG images. Fo

A collection of (ANSI-sequence aware) text reflow operations & algorithms
A collection of (ANSI-sequence aware) text reflow operations & algorithms

reflow A collection of ANSI-aware methods and io.Writers helping you to transform blocks of text. This means you can still style your terminal output

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
This project provides Go bindings for nuklear.h — a small ANSI C GUI library.

Nuklear Package nk provides Go bindings for nuklear.h — a small ANSI C gui library. See github.com/vurtun/nuklear. All the binding code has automatica

 A library for parsing ANSI encoded strings
A library for parsing ANSI encoded strings

Go ANSI Parser converts strings with ANSI escape codes into a slice of structs that represent styled text

Small, fast library to create ANSI colored strings and codes. [go, golang]

ansi Package ansi is a small, fast library to create ANSI colored strings and codes. Install Get it go get -u github.com/mgutz/ansi Example import "gi

Simple library to handle ANSI functions and parsing of color formatting strings

Emerald A basic color library for use in my Go projects, built on top of mgutz/ansi. Package ansi is a small, fast library to create ANSI colored stri

Raw ANSI sequence helpers

Raw ANSI sequence helpers

Color lets you use colorized outputs in terms of ANSI Escape Codes in Go (Golang)
Color lets you use colorized outputs in terms of ANSI Escape Codes in Go (Golang)

Color lets you use colorized outputs in terms of ANSI Escape Codes in Go (Golang). It has support for Windows too! The API can be used in several ways, pick one that suits you.

Metrics dashboards on terminal (a grafana inspired terminal version)

Grafterm Visualize metrics dashboards on the terminal, like a simplified and minimalist version of Grafana for terminal. Features Multiple widgets (gr

Comments
  • Fix README

    Fix README

    If you run the code you provide you will get a compile error because lowercase 'colourize' is not exported function , also you forgot to close the parenthsis. Anyway nice job, continue this, make it working with windows cmd too

    opened by ghost 1
Owner
Trey Bastian
Founder & CTO @ Firstbase https://www.FirstbaseHQ.com WE ARE HIRING!
Trey Bastian
Intuitive package for prettifying terminal/console output. http://godoc.org/github.com/ttacon/chalk

chalk Chalk is a go package for styling console/terminal output. Check out godoc for some example usage: http://godoc.org/github.com/ttacon/chalk The

Trey Tacon 418 Dec 23, 2022
Console Text Colors - The non-invasive cross-platform terminal color library does not need to modify the Print method

ctc - Console Text Colors The non-invasive cross-platform terminal color library does not need to modify the Print method Virtual unix-like environmen

null 41 Nov 9, 2022
Simple tables in terminal with Go

Simple tables in terminal with Go This package allows to generate and display ascii tables in the terminal, f.e.: +----+------------------+-----------

Alexey Popov 408 Dec 29, 2022
Terminal based dashboard.

Termdash is a cross-platform customizable terminal based dashboard. The feature set is inspired by the gizak/termui project, which in turn was inspire

Jakub Sobon 2.2k Dec 28, 2022
Golang terminal dashboard

termui termui is a cross-platform and fully-customizable terminal dashboard and widget library built on top of termbox-go. It is inspired by blessed-c

Zack Guo 12.3k Dec 27, 2022
uilive is a go library for updating terminal output in realtime

uilive uilive is a go library for updating terminal output in realtime. It provides a buffered io.Writer that is flushed at a timed interval. uilive p

Greg Osuri 1.5k Dec 28, 2022
A go library to render progress bars in terminal applications

uiprogress A Go library to render progress bars in terminal applications. It provides a set of flexible features with a customizable API. Progress bar

Greg Osuri 2k Dec 29, 2022
A go library to improve readability in terminal apps using tabular data

uitable uitable is a go library for representing data as tables for terminal applications. It provides primitives for sizing and wrapping columns to i

Greg Osuri 685 Dec 30, 2022
Yet Another CLi Spinner; providing over 70 easy to use and customizable terminal spinners for multiple OSes

Yet Another CLi Spinner (for Go) Package yacspin provides yet another CLi spinner for Go, taking inspiration (and some utility code) from the https://

Tim Heckman 387 Dec 25, 2022