All Projects → raphamorim → go-rainbow

raphamorim / go-rainbow

Licence: MIT license
Golang Helper for beautiful CLI Applications

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to go-rainbow

colors-convert
🦚 A simple colors library
Stars: ✭ 15 (-82.56%)
Mutual labels:  hex, colors, rgb, rgba
React Color Extractor
A React component which extracts colors from an image
Stars: ✭ 314 (+265.12%)
Mutual labels:  hex, colors, rgb
Gradstop
JavaScript micro library to generate gradient color stops 🏳️‍🌈
Stars: ✭ 144 (+67.44%)
Mutual labels:  hex, colors, rgb
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (+12.79%)
Mutual labels:  hex, colors, rgb
Tints And Shades
🌈 Display tints and shades of a given hex color in 10% increments.
Stars: ✭ 228 (+165.12%)
Mutual labels:  hex, colors, rgb
hex-rgba
Convert HEX to RGBA
Stars: ✭ 12 (-86.05%)
Mutual labels:  hex, colors, rgba
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-84.88%)
Mutual labels:  hex, rgb, rgba
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (-8.14%)
Mutual labels:  hex, rgb
Material Palette Generator
🎨 Get perfect Material Design color palettes from any hex color.
Stars: ✭ 114 (+32.56%)
Mutual labels:  hex, colors
Alfred-Colors-workflow
hex <=> rgb <=> hsl
Stars: ✭ 28 (-67.44%)
Mutual labels:  hex, rgb
Culori
A comprehensive color library for JavaScript.
Stars: ✭ 271 (+215.12%)
Mutual labels:  hex, rgb
Color
A little library to deal with color conversions
Stars: ✭ 166 (+93.02%)
Mutual labels:  hex, rgb
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-77.91%)
Mutual labels:  rgb, rgba
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (-11.63%)
Mutual labels:  hex, rgb
Colorpicker
A mininal but complete colorpicker desktop app
Stars: ✭ 766 (+790.7%)
Mutual labels:  hex, rgb
leeks.js
Simple ANSI styling for your terminal
Stars: ✭ 12 (-86.05%)
Mutual labels:  colors, rgb
vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (+2.33%)
Mutual labels:  hex, rgb
react-color
🎨 Is a tiny color picker widget component for React apps.
Stars: ✭ 50 (-41.86%)
Mutual labels:  hex, rgba
sourcerer
read code like a wizard. a 16bit color scheme for hackers
Stars: ✭ 136 (+58.14%)
Mutual labels:  colors, xterm
hex-color-regex
Regular expression for matching hex color values from string.
Stars: ✭ 29 (-66.28%)
Mutual labels:  hex, colors

go-rainbow Build Status

Extremely inspired by chalk.js

go-rainbow allows you to:

  • Iterate modifiers and colors on a String.
  • Use HEX as you wish.
  • Use from Int as you wish.
  • Use RGB as you wish (work in progress).
  • Bring magical Rainbow on a String (work in progress).

Sample

Available animations

Name Preview
rainbow on going...
pulse on going...
glitch on going...
radar on going...
neon rainbow

Summary

  • Install
  • Example
  • Hex
  • FromInt32
  • Iterables
  • Modifiers
    • Bold
    • Dim
    • Italic
    • Underline
    • Reverse
    • Hidden
  • Colors
    • Black
    • Red
    • Green
    • Yellow
    • Blue
    • Magenta
    • Cyan
    • White
    • RedBright
    • GreenBright
    • YellowBright
    • BlueBright
    • MagentaBright
    • CyanBright
    • WhiteBright
  • Background Colors
    • BgBlack
    • BgRed
    • BgGreen
    • BgYellow
    • BgBlue
    • BgMagenta
    • BgCyan
    • BgWhite
    • BgBlackBright
    • BgRedBright
    • BgGreenBright
    • BgYellowBright
    • BgBlueBright
    • BgMagentaBright
    • BgCyanBright
    • BgWhiteBright
  • Animations
    • Neon

Install

go get github.com/raphamorim/go-rainbow

Example

main.go

package main
import (
    "fmt"

    "github.com/raphamorim/go-rainbow"
)

func main() {
    fmt.Println(rainbow.Bold(rainbow.Hex("#8E44AD", "raphael")))
}

go-main-example

Hex

ftm.Printf("%s", rainbow.Hex("#000080", "String from HEX")) // should be index 4 (navy blue)

FromInt32

32-bit unsigned integer equivalent (uint32)

fmt.Printf("%s", rainbow.FromInt32(0xCC66FFFF, "String from Int32"))

Modifiers

Usage

rainbow.Bold("String in Bold")
  • Bold
  • Dim
  • Italic (Not widely supported)
  • Underline
  • Reverse
  • Hidden
  • Strikethrough (Not widely supported)

Colors

Usage

rainbow.Blue("String in Blue")

List

  • Black
  • Red
  • Green
  • Yellow
  • Blue
  • Magenta
  • Cyan
  • White
  • RedBright
  • GreenBright
  • YellowBright
  • BlueBright
  • MagentaBright
  • CyanBright
  • WhiteBright

Soon (send a PR to help us!):

  • Gray

Background Colors

rainbow.BgBlue("String in Blue Background")

List

  • BgBlack
  • BgRed
  • BgGreen
  • BgYellow
  • BgBlue
  • BgMagenta
  • BgCyan
  • BgWhite
  • BgBlackBright
  • BgRedBright
  • BgGreenBright
  • BgYellowBright
  • BgBlueBright
  • BgMagentaBright
  • BgCyanBright
  • BgWhiteBright

Iterables

abc := Bold(BgYellow(Blue("Bold+BgYellow+Blue")))
xyz := Dim(Underscore("Dim+Underscore"))

Animations

Animations have a different behavior of all methods, they realize the act of print, instead of only returning string.

Neon

code

rainbow.Animation("AWESOME NEON ANIMATION", "neon")

sample

rainbow

RGB (working on it)

rainbow.RGB(100, 110, 100)

License

The MIT License (MIT) - see LICENSE.md for more details

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].