{"id":22326514,"url":"https://github.com/thecodesmith/chalk","last_synced_at":"2025-08-17T10:39:45.917Z","repository":{"id":84776719,"uuid":"245456008","full_name":"thecodesmith/chalk","owner":"thecodesmith","description":"Pretty terminal colors for Groovy and Gradle","archived":false,"fork":false,"pushed_at":"2020-03-20T17:50:11.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T06:12:47.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/thecodesmith.png","metadata":{"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,"publiccode":null,"codemeta":null}},"created_at":"2020-03-06T15:36:20.000Z","updated_at":"2023-10-24T19:48:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"c73b4c40-f5ca-4c9c-bab6-7e142d3f72ac","html_url":"https://github.com/thecodesmith/chalk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecodesmith/chalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodesmith%2Fchalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodesmith%2Fchalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodesmith%2Fchalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodesmith%2Fchalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodesmith","download_url":"https://codeload.github.com/thecodesmith/chalk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodesmith%2Fchalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270837412,"owners_count":24654378,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-04T02:17:59.080Z","updated_at":"2025-08-17T10:39:45.891Z","avatar_url":"https://github.com/thecodesmith.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chalk\n\n_Pretty terminal colors for Groovy._\n\n![CI](https://github.com/thecodesmith/chalk/workflows/CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/thecodesmith/chalk/badge.svg)](https://coveralls.io/github/thecodesmith/chalk)\n[![Download](https://api.bintray.com/packages/thecodesmith/maven/chalk/images/download.svg)](https://bintray.com/thecodesmith/maven/chalk/_latestVersion)\n\nInspired by the popular JavaScript library [chalk](https://github.com/chalk/chalk), and designed for idiomatic Groovy.\n\nThere are already a number of terminal color libraries for Java, but they all feel like writing, well, _Java_. This library is designed specifically with Groovy in mind, and takes advantage of Groovy's [extension modules](https://mrhaki.blogspot.com/2013/01/groovy-goodness-adding-extra-methods.html) to provide a clean, concise experience. Since I write most of my code in Groovy, I prefer to have an expressive API that feels more like natural language.\n\n## Usage\n\nThe latest version is available from Bintray: [![Download](https://api.bintray.com/packages/thecodesmith/maven/chalk/images/download.svg?version=1.0.0-b.1)](https://bintray.com/thecodesmith/maven/chalk/1.0.0-b.1/link).\nReplace the `{version}` tags below with the latest release version.\n\n### Using With Gradle\n\n```groovy\nimplementation 'com.thecodesmith:chalk:{version}'\n```\n\n### Using With Groovy @Grab\n\n```groovy\n@Grab('com.thecodesmith:chalk:{version}')\n```\n\n### Methods\n\nThis library makes additional color methods available directly on the `String` class. Here's an example:\n\n```groovy\nprintln 'Hello, World!'.green.bold.underlined\n```\n\nThese are implemented as getters on the `String` class, so the full form is like `'foo'.getGreen()`, but of course with Groovy we can use the property-style accessor and shorten it to `'foo'.green`.\n\n### Composability\n\nThe text color, background color and text styles can all be composed together. Example:\n\n```groovy\nprintln 'foo'.blue.redBackground.bold.underlined\n```\n\n### Property Form and Method-chaining Form\n\nThere are two main ways to accomplish the same output. The easiest is to use the property form, like this:\n\n```groovy\nprintln 'foo'.red\nprintln 'bar'.red.whiteBackground\nprintln 'baz'.red.whiteBackground.bold\n```\n\nAnother way of accomplishing the same output is to use methods, like this:\n\n```groovy\nimport static com.thecodesmith.chalk.Color.red\nimport static com.thecodesmith.chalk.Color.white\nimport static com.thecodesmith.chalk.Style.bold\n\nprintln 'foo'.text(red)\nprintln 'bar'.text(red).background(white)\nprintln 'baz'.text(red).background(white).style(bold)\n```\n\nThey work the same, it is just a matter of preference which you use.\n\n### Colors\n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n\nExtended colors (256-bit) are supported via the `color(int code)` method, which takes an ANSI color code, `0-255`. Example:\n\n```groovy\nprintln 'foo'.color(214)\n```\n\n### Background Colors\n\n- `blackBackground`\n- `redBackground`\n- `greenBackground`\n- `yellowBackground`\n- `blueBackground`\n- `magentaBackground`\n- `cyanBackground`\n- `whiteBackground`\n\n### Text Styles\n\n- `bold`\n- `underlined`\n- `reversed`\n\n## Contributing\n\nSee a feature that is missing? Feel free to open an issue, or contribute a pull request!\n\n## License\n\nThis library is licensed under the terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodesmith%2Fchalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodesmith%2Fchalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodesmith%2Fchalk/lists"}