Package - jdhealy/PrettyColors

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.

Github

link
Stars: 147

Advertisement

Releases

v4.0.0 - Aug 24, 2016

Notice: No breaking API changes! In fact, no Swift source file changes whatsoever!

This semantic versioning major version bump indicates the breaking — not of source compatibility API — but of project build setting API:

Changes between v3.0.2 and v4.0.0.

v3.0.2 - Apr 3, 2016

Tests: Stop building test target for Run and Analyze actions.

Avoid unnecessary test builds and more closely match Xcode 7.3.0 new project build actions for test targets.

Changes between v3.0.1 and v3.0.2.

v3.0.1 - Apr 1, 2016