I\'m writing a command line tool with Swift and I\'m having trouble displaying colors in my shell. I\'m using the following code:
println(\"\\033[31;32mhey\\033
You can use Rainbow if you don't mind using it as a framework.
import Rainbow print("Red text".red) print("Yellow background".onYellow) print("Light green text on white background".lightGreen.onWhite)
https://github.com/onevcat/Rainbow