PrettyColors

5.0.2

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

What's New

2019-03-25T06:02:12Z

Changelog · No Source Changes

  • Swift Package Manager: Additionally specify tools version of 4.0.

    Allows for compilation from Swift 5.0’s Package Manager, which has support stretching back accommodating this.

  • For CocoaPods, specify supported Swift versions.

Changes between 5.0.1 and 5.0.2.

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

Add the following to your Cartfile:

github "jdhealy/PrettyColors"

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.

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Oct 17 2024 14:34:33 GMT-0900 (Hawaii-Aleutian Daylight Time)