🌟 print fabulously in your terminal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
fab.nimble
readme.md

readme.md

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?")

Installation

$ nimble install fab

Screenshot

screenshot

Colors

colors

Styles

styles

Labels

labels

Color procs

blue(), yellow(), red(), green(), white(), purple(), black(), cyan()

Style procs

bold(), italics(), strike(), under()

Label procs

que(), info(), run(), bad(), good()
Style
  styleBright,     # bright text
  styleDim,        # dim text
  styleUnknown,    # unknown
  styleUnderscore, # underscored text
  styleBlink,      # blinking/bold text
  styleHidden      # hidden text

Example

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

Example

bold("this is bold and red", fg = fgRed)

More examples

blue("this is bold and underlined blue", sty = {styleBright, styleUnderscore}, nl = false) # no newline

dim("this is yellow and dim", fg = fgYellow)

Inspiration

This project was heavily inspired by @s0md3v's Hue.

Contributing

Bad code? New feature in mind? Open an issue. Better still, learn Nim and shoot a PR

Credits

Thanks a bunch to @kaushalmodi for the complete rewrite. It's all pretty much his now.

License

MIT © Anirudh Oppiliappan