Skip to content

Instantly share code, notes, and snippets.

@ivan3bx
Created December 7, 2014 23:01
Show Gist options
  • Save ivan3bx/ba19f02c7f07f8508671 to your computer and use it in GitHub Desktop.
Save ivan3bx/ba19f02c7f07f8508671 to your computer and use it in GitHub Desktop.
ANSI color sequence example in Swift (Unicode)
let escape = "\u{001B}["
let none = escape + "0m"
let red = escape + "0;31m"
let green = escape + "0;32m"
let yellow = escape + "0;33m"
println("\(red)Everything \(green)or \(yellow)nothing\(none).")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment