Latest 5.0.1
Homepage https://github.com/jdhealy/PrettyColors
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Authors

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.

Latest podspec

{
    "name": "PrettyColors",
    "version": "5.0.1",
    "summary": "Styles and colors text in the Terminal with ANSI escape codes. Conforms to ECMA Standard 48.",
    "homepage": "https://github.com/jdhealy/PrettyColors",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "J.D. Healy": "[email protected]"
    },
    "social_media_url": "http://twitter.com/jdhealy",
    "source": {
        "git": "https://github.com/jdhealy/PrettyColors.git",
        "tag": "5.0.1"
    },
    "source_files": "Source/**/*.{h,swift}",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This