{"id":909,"url":"https://github.com/jdhealy/PrettyColors","last_synced_at":"2025-08-06T13:31:57.855Z","repository":{"id":25603395,"uuid":"29038432","full_name":"jdhealy/PrettyColors","owner":"jdhealy","description":"Styles and colors text in the Terminal with ANSI escape codes. Conforms to ECMA Standard 48.","archived":false,"fork":false,"pushed_at":"2020-08-12T22:46:05.000Z","size":152,"stargazers_count":171,"open_issues_count":5,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-24T20:58:38.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdhealy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-09T22:34:59.000Z","updated_at":"2024-04-22T16:11:37.000Z","dependencies_parsed_at":"2022-08-24T09:51:14.075Z","dependency_job_id":null,"html_url":"https://github.com/jdhealy/PrettyColors","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhealy%2FPrettyColors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhealy%2FPrettyColors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhealy%2FPrettyColors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhealy%2FPrettyColors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdhealy","download_url":"https://codeload.github.com/jdhealy/PrettyColors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905440,"owners_count":17989766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:34.420Z","updated_at":"2024-12-09T14:30:41.557Z","avatar_url":"https://github.com/jdhealy.png","language":"Swift","funding_links":[],"categories":["Libs","Color","Colors [🔝](#readme)"],"sub_categories":["Colors","Other free courses","Linter"],"readme":"# PrettyColors\n\n[![Carthage Compatibility](https://img.shields.io/badge/Carthage-✔-f2a77e.svg?style=flat)][carthage]\n[![Swift Package Manager Compatibility](https://img.shields.io/badge/Swift%20Package%20Manager-✔-f2a77e.svg?style=flat)](./Package.swift)\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/PrettyColors.svg?style=flat)][CocoaPods]\n[![License](https://img.shields.io/cocoapods/l/PrettyColors.svg?style=flat)](./LICENSE.md)\n[![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20linux-lightgrey.svg)][deployment_targets]\n\n[carthage]: https://github.com/Carthage/Carthage/\n[CocoaPods]: https://cocoapods.org/pods/PrettyColors/\n[deployment_targets]: https://github.com/jdhealy/PrettyColors/blob/40dba7f/PrettyColors.podspec#L14-L17\n\n## Description\n`PrettyColors` is a Swift library for styling and coloring text in the Terminal.\nThe library outputs [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) and conforms to [ECMA Standard 48](http://www.ecma-international.org/publications/standards/Ecma-048.htm).\n\n### Example\n```swift\nimport PrettyColors\n\nlet redText: String = Color.Wrap(foreground: .red).wrap(\"A red piece of text.\")\nprintln(redText)\n\nColor.Wrap(foreground: .yellow, style: .bold)\nColor.Wrap(foreground: .green, background: .black, style: .bold, .underlined)\n\n// 8-bit (256) color support\nColor.Wrap(foreground: 114)\nColor.Wrap(foreground: 114, style: .bold)\n```\n\n**More examples can be found in [the tests](./Tests/UnitTests/PrettyColorsTests.swift).**\n\n### Installation\n#### [Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)\nAdd the following to your Cartfile:\n\n```ogdl\ngithub \"jdhealy/PrettyColors\"\n```\n#### [CocoaPods](https://cocoapods.org)\nAdd the following to your [Podfile](https://guides.cocoapods.org/using/the-podfile.html):\n\n```ruby\npod 'PrettyColors', :git =\u003e 'https://github.com/jdhealy/PrettyColors'\n```\n\nYou will also need to make sure you're opting into using frameworks:\n\n```ruby\nuse_frameworks!\n```\n\nThen run `pod install` with CocoaPods 0.36 or newer.\n\n## Inspiration\n- [`junegunn/ansi256`](https://github.com/junegunn/ansi256/)\n- [`tehmaze/ansi`](https://github.com/tehmaze/ansi/)\n\n## License\nPrettyColors is released under the [MIT license](https://opensource.org/licenses/MIT). See [LICENSE.md](./LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhealy%2FPrettyColors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdhealy%2FPrettyColors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhealy%2FPrettyColors/lists"}