{"id":13409882,"url":"https://github.com/wzshiming/ctc","last_synced_at":"2025-07-20T13:35:25.057Z","repository":{"id":57483082,"uuid":"131329799","full_name":"wzshiming/ctc","owner":"wzshiming","description":"Console Text Colors - The non-invasive cross-platform terminal color library does not need to modify the Print method","archived":false,"fork":false,"pushed_at":"2023-02-25T04:42:50.000Z","size":47,"stargazers_count":47,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T16:59:53.965Z","etag":null,"topics":["color","colors","console","go","non-invasive","unix"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wzshiming.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}},"created_at":"2018-04-27T18:07:42.000Z","updated_at":"2025-01-14T03:20:28.000Z","dependencies_parsed_at":"2024-01-08T14:30:46.774Z","dependency_job_id":"5c245991-2947-43ef-8bc7-64949c44dca5","html_url":"https://github.com/wzshiming/ctc","commit_stats":{"total_commits":63,"total_committers":1,"mean_commits":63.0,"dds":0.0,"last_synced_commit":"0844fc1435181c87a5c6b7e4d5aecb434722c18b"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fctc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fctc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fctc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wzshiming%2Fctc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wzshiming","download_url":"https://codeload.github.com/wzshiming/ctc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116231,"owners_count":21215142,"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":["color","colors","console","go","non-invasive","unix"],"created_at":"2024-07-30T20:01:03.866Z","updated_at":"2025-04-15T16:59:59.327Z","avatar_url":"https://github.com/wzshiming.png","language":"Go","funding_links":[],"categories":["Command Line","Go","命令行","Build Automation","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","高级控制台UI"],"sub_categories":["Advanced Console UIs","高级控制台用户界面","标准 CLI"],"readme":"# ctc - Console Text Colors\n\n[![Build Status](https://travis-ci.org/wzshiming/ctc.svg?branch=master)](https://travis-ci.org/wzshiming/ctc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wzshiming/ctc)](https://goreportcard.com/report/github.com/wzshiming/ctc)\n[![GoDoc](https://godoc.org/github.com/wzshiming/ctc?status.svg)](https://godoc.org/github.com/wzshiming/ctc)\n[![GitHub license](https://img.shields.io/github/license/wzshiming/ctc.svg)](https://github.com/wzshiming/ctc/blob/master/LICENSE)\n[![gocover.io](https://gocover.io/_badge/github.com/wzshiming/ctc)](https://gocover.io/github.com/wzshiming/ctc)\n\nThe non-invasive cross-platform terminal color library does not need to modify the Print method\n\nVirtual unix-like environments on Windows\n\nCursor related in [github.com/wzshiming/cursor](https://github.com/wzshiming/cursor)\n\n- [English](https://github.com/wzshiming/ctc/blob/master/README.md)\n- [简体中文](https://github.com/wzshiming/ctc/blob/master/README_cn.md)\n\n## Support style\n\n- [x] console\n  - [x] unix-like (mac \u0026 linux)\n  - [x] windows\n\n## example\n\n``` golang\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/wzshiming/ctc\"\n)\n\nfunc main() {\n\t// No invasion\n\tfmt.Println(ctc.BackgroundRed|ctc.ForegroundBlue, \"Hello world\", ctc.Reset)\n}\n\n```\n\n## SGR (Select Graphic Rendition)\n\n|   Value | Description       | Behavior                                                          |\n| ------: | :---------------- | :---------------------------------------------------------------- |\n|       0 | Default           | Returns all attributes to the default state prior to modification |\n|       4 | Underline         | Adds underline                                                    |\n|       7 | Negative          | Swaps foreground and background colors                            |\n|   30~37 | Foreground        | Applies non-bold/bright color to foreground                       |\n|   40~47 | Background        | Applies non-bold/bright color to background                       |\n|   90~97 | Bright Foreground | Applies bold/bright color to foreground                           |\n| 100~107 | Bright Background | Applies bold/bright color to background                           |\n\n## License\n\nPouch is licensed under the MIT License. See [LICENSE](https://github.com/wzshiming/ctc/blob/master/LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwzshiming%2Fctc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwzshiming%2Fctc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwzshiming%2Fctc/lists"}