Print fabulously in your terminal (in Nim).
Fab is a really cool text formatting package for Nim. Using Fab is super easy, it's as simple as:
import fab
blue("hey i'm blue!")
bold("this is bold text")
que("what?")
$ nimble install fab
blue(), yellow(), red(), green(), white(), purple(), black(), cyan()
bold(), italics(), strike(), under()
que(), info(), run(), bad(), good()
Style
styleBright, # bright text
styleDim, # dim text
styleUnknown, # unknown
styleUnderscore, # underscored text
styleBlink, # blinking/bold text
styleHidden # hidden text
blue("this is bold and blue", sty = {styleBright})
ForegroundColor
fgBlack, # black
fgRed, # red
fgGreen, # green
fgYellow, # yellow
fgBlue, # blue
fgMagenta, # magenta
fgCyan, # cyan
fgWhite # white
bold("this is bold and red", fg = fgRed)
blue("this is bold and underlined blue", sty = {styleBright, styleUnderscore}, nl = false) # no newline
dim("this is yellow and dim", fg = fgYellow)
This project was heavily inspired by @s0md3v's Hue.
Bad code? New feature in mind? Open an issue. Better still, learn Nim and shoot a PR :sparkles:
Thanks a bunch to @kaushalmodi for the complete rewrite. It's all pretty much his now.
MIT © Anirudh Oppiliappan