0

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:

I trying a lot solution but always the same thing

print("\u{001B}[0;33myellow")

OUTPUT:[0;33myellow

I expect the output is change color in console, is like to logcat

Vinicius Mangueira
  • 309
  • 1
  • 2
  • 9

1 Answers1

1

Xcode doesn't support console coloring since Xcode 8

but you can use emojis instead! for example you can use You can use ⚠️ for warning messages and for error messages. (like the Xcode itself)

Or simply use these note books as a color:

: error message
: warning message
: ok status message
: action message
: canceled status message
: Or anything you like and want to recognize immediately by color
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278