Popularity
3.0
Stable
Activity
1.4
Declining
159
4
17

Code Quality Rank: L5
Monthly Downloads: 0
Programming language: Swift
License: NOASSERTION
Tags: Color    
Latest version: v5.0.2

PrettyColors alternatives and similar libraries

Based on the "Color" category

Do you think we are missing an alternative of PrettyColors or a related project?

Add another 'Color' Library

README

PrettyColors

Carthage Compatibility [Swift Package Manager Compatibility](./Package.swift) CocoaPods Version [License](./LICENSE.md) 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](./Tests/UnitTests/PrettyColorsTests.swift).

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](./LICENSE.md) for details.


*Note that all licence references and agreements mentioned in the PrettyColors README section above are relevant to that project's source code only.