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.
Add the following to your Cartfile:
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:
pod install with CocoaPods 0.36 or newer.
5.0.1 - Oct 6, 2017
Changelog · No Source Changes
- Update various
5.0.0 - Jan 31, 2017
Changelog · Breaking Changes
- Conform to updated Standard Library in regards to API Guidelines.
- Conform to new Collection indexing model.
- Lowercase enum names and static properties.
- Remove Foundation import, never previously relied upon.
Tests still use a subset of Foundation where apple/swift-corelibs-foundation can service those simple needs.
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:
- The reduction to a single framework target and single scheme accommodating macOS, iOS, tvOS, and watchOS.
- Code signing changes for the
- Remove configuration
CODE_SIGN_IDENTITY[sdk=iphoneos*] = "iPhone Developer".
- Code signing will usually still be required at the point of embedding PrettyColors in a code-signed bundle.
v3.0.2 - Apr 3, 2016
Avoid unnecessary test builds and more closely match Xcode 7.3.0 new project build actions for test targets.