All Projects → dollarshaveclub → line

dollarshaveclub / line

Licence: MIT license
An easy to use golang package for stylizing terminal output

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to line

log-utils
Basic logging utils: colors, symbols and timestamp.
Stars: ✭ 24 (-7.69%)
Mutual labels:  color, colors, ansi-colors
multi-brand-colors
Multi Brand Colors with support for CSS/CSS-Vars/SCSS/SASS/Stylus/LESS/JSON
Stars: ✭ 26 (+0%)
Mutual labels:  color, colors
kolorist
A tiny utility to colorize stdin/stdout
Stars: ✭ 160 (+515.38%)
Mutual labels:  colors, ansi-colors
color-math
Expressions to manipulate colors.
Stars: ✭ 18 (-30.77%)
Mutual labels:  color, colors
Giotto
Theme manager for your app: apply styles to anything you want through a plist file
Stars: ✭ 18 (-30.77%)
Mutual labels:  color, colors
jsoncolor
Colorized JSON output for Go
Stars: ✭ 27 (+3.85%)
Mutual labels:  color, colors
leeks.js
Simple ANSI styling for your terminal
Stars: ✭ 12 (-53.85%)
Mutual labels:  color, colors
Androidphotoshopcolorpicker
A fully featured Color picker Library for Android
Stars: ✭ 220 (+746.15%)
Mutual labels:  color, colors
anypalette.js
🎨 Read/write all color palette file formats ❤🧡💛💚💙💜
Stars: ✭ 41 (+57.69%)
Mutual labels:  color, colors
color
OCaml library to work with colors on the web
Stars: ✭ 20 (-23.08%)
Mutual labels:  color, colors
pantone-colors
Hex values of all 2310 Pantone colors
Stars: ✭ 147 (+465.38%)
Mutual labels:  color, colors
colors
A gorgeous, accessible color system.
Stars: ✭ 748 (+2776.92%)
Mutual labels:  color, colors
UIImageColorRatio
A tool to calculate the color ratio of UIImage in iOS.
Stars: ✭ 34 (+30.77%)
Mutual labels:  color, colors
SwiftColorWheel
Delightful color picker wheel for iOS in Swift.
Stars: ✭ 37 (+42.31%)
Mutual labels:  color, colors
slick
Vim/Neovim Colortheme–Truecolor, Stunning, Complete
Stars: ✭ 15 (-42.31%)
Mutual labels:  color, colors
console-logging
Better, prettier commandline logging for Python--with colors! 👻
Stars: ✭ 111 (+326.92%)
Mutual labels:  color, colors
Jsome
✨ Make your JSON look AWESOME
Stars: ✭ 179 (+588.46%)
Mutual labels:  color, colors
Colors.lol
🎨 Overly descriptive color palettes
Stars: ✭ 207 (+696.15%)
Mutual labels:  color, colors
colr
Easy terminal colors, with chainable methods.
Stars: ✭ 32 (+23.08%)
Mutual labels:  color, ansi-colors
concolor
Colouring template strings using tags with annotations 🎨
Stars: ✭ 35 (+34.62%)
Mutual labels:  color, colors

line  

GoDoc CircleCI Go Report Card

line is an easy to use package for stylizing terminal output. line focuses on usability via chaining and, consequently, is quite flexible. line also boasts compatibility with the popular Color package.

Install

go get github.com/dollarshaveclub/line

Usage

Simple

package main

import "github.com/dollarshaveclub/line"

func main() {
    line.Red().Print("Hello ").Green("World").Blue().Println("!!!")
}

Simple Usage

Prefix / Suffix

package main

import "github.com/dollarshaveclub/line"

func main() {
	line.Prefix("--> ").Suffix(" <---").Println("Nice to meet you!").Println("And you too!")
}

Prefix / Suffix Usage

Complex

package main

import (
	"os"

	"github.com/dollarshaveclub/line"
	"github.com/fatih/color"
)

func main() {
	output := line.New(os.Stdout, "", "", line.WhiteColor)
	output.Println("Welcome! Here is a list:")

	li := output.Prefix("--> ").Red()
	li.Println("one").Println("two").Println("sub")

	subli := li.Prefix("  --> ").Green()
	subli.Println("a").Println("b")

	output.Println()

	boldgreen := color.New(color.Bold, color.FgMagenta)
	output.Format(boldgreen).Println("Have a nice day!")
}

Complex Usage

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].