fab

Print fabulously in your terminal

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install fab
choosenim install fab
git clone https://github.com/icyphox/fab

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
fab - - - - - - -

Source

Repository https://github.com/icyphox/fab
Homepage https://github.com/icyphox/fab
Documentation View Documentation
Registry Source nimble_official

README

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 :sparkles:

Credits

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

License

MIT © Anirudh Oppiliappan