F# printf functions but with colors !
F# Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.paket
.vscode
doc
src
.editorconfig
.gitattributes
.gitignore
.travis.yml
BlackFox.ColoredPrintf.sln
License.md
Readme.md
Release Notes.md
appveyor.yml
build.cmd
build.sh
global.json
paket.dependencies
paket.exe
paket.lock
paket.sh
test.1.fsx
test.fsx

Readme.md

Colored Printf

Join the chat at https://gitter.im/vbfox/ColoredPrintf AppVeyor Build status Travis-CI Build status Nuget Package

This library provide a replacement to F# printf function with color support.

The syntax to set the color inside the string is $foreground;background[text] where both foreground and background are optional.

Examples

colorprintfn "Hello $red[world]."
colorprintfn "Hello $green[%s]." "user"
colorprintfn "$white[Progress]: $yellow[%.2f%%] (Eta $yellow[%i] minutes)" 42.33 5
colorprintfn "$white;blue[%s ]$black;white[%s ]$white;red[%s]" "La vie" "est" "belle"

Displays :

Demo