{"id":13951056,"url":"https://github.com/mxcl/Chalk","last_synced_at":"2025-07-20T13:32:20.160Z","repository":{"id":34221990,"uuid":"171754351","full_name":"mxcl/Chalk","owner":"mxcl","description":"Terminal colors using Swift 5’s string interpolation extensions.","archived":false,"fork":false,"pushed_at":"2024-02-22T11:50:45.000Z","size":907,"stargazers_count":223,"open_issues_count":1,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-19T04:29:49.461Z","etag":null,"topics":["swift","terminal-colors"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxcl.png","metadata":{"funding":{"github":"mxcl","patreon":"mxcl"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-02-20T21:47:00.000Z","updated_at":"2025-07-13T16:25:51.000Z","dependencies_parsed_at":"2024-04-20T17:43:09.285Z","dependency_job_id":"68a45869-f316-42cb-9e99-52dcd845774a","html_url":"https://github.com/mxcl/Chalk","commit_stats":{"total_commits":17,"total_committers":3,"mean_commits":5.666666666666667,"dds":"0.17647058823529416","last_synced_commit":"a7f58e47a08ca5a84f73acc4bcf6c2c19d990609"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mxcl/Chalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxcl","download_url":"https://codeload.github.com/mxcl/Chalk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcl%2FChalk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265903403,"owners_count":23846525,"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":["swift","terminal-colors"],"created_at":"2024-08-08T06:01:12.197Z","updated_at":"2025-07-20T13:32:19.900Z","avatar_url":"https://github.com/mxcl.png","language":"Swift","funding_links":["https://github.com/sponsors/mxcl","https://patreon.com/mxcl","https://www.patreon.com/mxcl"],"categories":["Swift"],"sub_categories":[],"readme":"# Chalk\n\nTerminal colors using Swift 5’s string interpolation extensions.\n\n\u003cimg src=\"../gh-pages/Screenshot.1.png\" width=\"467\"\u003e\n\n```swift\nimport Chalk  // @mxcl ~\u003e 0.3\n\nlet colorString = \"blue\"\nprint(\"Here’s \\(colorString, color: .blue)!\")\n```\n\n# Styles, Backgrounds, Extended Colors etc.\n\n```swift\n// color, background \u0026 style can be specified all together or individually:\nprint(\"Foo \\(string, color: .blue) bar\")\nprint(\"Foo \\(string, color: .blue, background: .yellow) bar\")\nprint(\"Foo \\(string, color: .blue, background: .yellow, style: .underline) bar\")\n\n// styles are an `OptionSet`:\nprint(\"Foo \\(string, style: .underline) bar\")\nprint(\"Foo \\(string, style: [.underline, .bold]) bar\")\n\n// 256 color mode is supported:\nprint(\"Foo \\(string, color: .extended(78) bar\")\n```\n\n# Name\n\n[Chalk] by [@sindresorhus] is an extremely famous Node package for the same\npurpose. Open source is facilitated by naming connections, we picked the same\nname to enable those mental connections.\n\nThis package is called Chalk, or `mxcl/Chalk` or Chalk for Swift when\ndisambiguating.\n\n[@sindresorhus]: https://github.com/sindresorhus\n[Chalk]: https://github.com/chalk/chalk\n\n# Support mxcl\n\nHey there, I’m Max Howell, a prolific producer of open source and probably you\nalready use some of it (I created [`brew`]). I work full-time on open source and\nit’s hard; currently *I earn less than minimum wage*. Please help me continue my\nwork, I appreciate it 🙏🏻\n\n\u003ca href=\"https://www.patreon.com/mxcl\"\u003e\n\t\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e\n\n[Other ways to say thanks](http://mxcl.dev/#donate).\n\n[`brew`]: https://brew.sh\n\n# Demo\n\nIf you have [`swift-sh`]:\n\n```\n$ swift sh \u003c\u003cEOF\nimport Foundation\nimport Chalk  // @mxcl ~\u003e 0.3\n\nfor x in 0..\u003c256 {\n    let cell = \" \\(x)\".padding(toLength: 5, withPad: \" \", startingAt: 0)\n    let terminator = (x + 3).isMultiple(of: 6) ? \"\\n\" : \"\"\n    print(\"\\(cell, color: .extended(15), background: .extended(UInt8(x)))\", terminator: terminator)\n}\nEOF\n```\n\nWill give you:\n\n\u003cimg src='../gh-pages/Screenshot.2.png' width='572'\u003e\n\n[`swift-sh`]: https://github.com/mxcl/swift-sh\n\n# Installation\n\nSwiftPM:\n\n```swift\npackage.append(.package(url: \"https://github.com/mxcl/Chalk.git\", from: \"0.1.0\"))\n```\n\nCarthage:\n\n\u003e Waiting on: [@Carthage#1945](https://github.com/Carthage/Carthage/pull/1945).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcl%2FChalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxcl%2FChalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcl%2FChalk/lists"}