Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
/ PrettyColors Public archive
forked from jdhealy/PrettyColors

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

License

Notifications You must be signed in to change notification settings

Carthage/PrettyColors

 
 

Repository files navigation

PrettyColors

[Carthage Compatibility][carthage] [CocoaPods Version][cocoadocs] [License][cocoadocs] [Platform][cocoadocs] [carthage]: https://github.com/Carthage/Carthage/ [cocoadocs]: http://cocoadocs.org/docsets/PrettyColors

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 96.2%
  • Ruby 2.4%
  • C++ 1.4%