Skip to content

F# printf functions but with colors !

License

Notifications You must be signed in to change notification settings

ma3yta/ColoredPrintf

 
 

Repository files navigation

Colored Printf

color drops Logo

AppVeyor Build status Travis-CI Build status VSTS 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

Thanks

About

F# printf functions but with colors !

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • F# 98.5%
  • Other 1.5%