Need help with PrettyColors?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jdhealy
168 Stars 18 Forks Other 169 Commits 6 Opened issues

Description

Styles and colors text in the Terminal with ANSI escape codes. Conforms to ECMA Standard 48.

Services available

!
?

Need anything else?

Contributors list

# 21,565
Swift
sentry
cocoa
auto-la...
158 commits
# 15,635
Swift
algebra...
Haskell
Shell
5 commits
# 2,696
Swift
Objecti...
mocking...
cocoapo...
3 commits

PrettyColors

Carthage Compatibility Swift Package Manager Compatibility CocoaPods Version License Platform

Description

PrettyColors
is a Swift library for styling and coloring text in the Terminal. The library outputs ANSI escape codes and conforms to ECMA Standard 48.

Example

import PrettyColors

let redText: String = Color.Wrap(foreground: .red).wrap("A red piece of text.") println(redText)

Color.Wrap(foreground: .yellow, style: .bold) Color.Wrap(foreground: .green, background: .black, style: .bold, .underlined)

// 8-bit (256) color support Color.Wrap(foreground: 114) Color.Wrap(foreground: 114, style: .bold)

More examples can be found in the tests.

Installation

Carthage

Add the following to your Cartfile:

github "jdhealy/PrettyColors"

CocoaPods

Add the following to your Podfile:

pod 'PrettyColors', :git => 'https://github.com/jdhealy/PrettyColors'

You will also need to make sure you're opting into using frameworks:

use_frameworks!

Then run

pod install
with CocoaPods 0.36 or newer.

Inspiration

License

PrettyColors is released under the MIT license. See LICENSE.md for details.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.