{"id":19084336,"url":"https://github.com/coghost/sgr-ansi","last_synced_at":"2026-05-16T11:02:14.973Z","repository":{"id":57466114,"uuid":"253185868","full_name":"coghost/sgr-ansi","owner":"coghost","description":"SGR ANSI colorful terminal","archived":false,"fork":false,"pushed_at":"2020-08-18T02:44:29.000Z","size":766,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T21:19:46.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coghost.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}},"created_at":"2020-04-05T08:12:26.000Z","updated_at":"2020-08-18T02:44:31.000Z","dependencies_parsed_at":"2022-08-31T02:11:35.119Z","dependency_job_id":null,"html_url":"https://github.com/coghost/sgr-ansi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coghost%2Fsgr-ansi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coghost%2Fsgr-ansi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coghost%2Fsgr-ansi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coghost%2Fsgr-ansi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coghost","download_url":"https://codeload.github.com/coghost/sgr-ansi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240136991,"owners_count":19753645,"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-11-09T02:50:58.206Z","updated_at":"2025-10-26T15:33:33.679Z","avatar_url":"https://github.com/coghost.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sgr-ansi\n\nawesome SGR ANSI colorful text interface in terminal\n\n\u003e full supported in python3.7+, macosx\n\n## awesome colorful text\n\n![colorful usage](docs/images/usage.png)\n\n![colorful demo1](docs/images/demo1.png)\n\n![colorful demo2](docs/images/demo2.png)\n\n## install\n\n```shell\npip install sgr-ansi\n```\n\n## usage\n\nBeware of two rules:\n- styles require **alphabet order**\n- styles go before colors\n\nabout styles, you can use as many as possible, but colors only the last two will take effect\n\nso like `BDISUkrgybmcw`, all `BDISU` will take effect, but for colors only `cw: cyan on white` will take effect\n\n### styles/colors supported\n\n\u003e styles\n\nB: bold, D: dimmed, I: italic, S: strike_through, U: underlined\n\n\u003e colors\n\nk: black, r: red, g: green, y: yellow b: blue, m: magenta, c: cyan, w: white\n\n\n```python\nimport sgr_ansi as echo\n\necho.BIg()\necho.BIg('I love you 3 thousand times')\n```\n\n### chained call\n\n```python\nfrom sgr_ansi import Chain\n\nChain().BIy('Yep,').BIUb(\n    'How do you like this?'\n).Bm('\\n\\t[✔]').BUg('1.').Bg('Y: yes.').Bm('\\n\\t[✘]').BUr('2.').Br('N: not.').show()\n```\n\n![colorful chain](docs/images/chain.png)\n\n## run demo\n\n\u003e just run `sgransi` to check all available styles\n\n```sh\n# after installed sgr_ansi, cli sgransi is available\nsgransi -h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoghost%2Fsgr-ansi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoghost%2Fsgr-ansi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoghost%2Fsgr-ansi/lists"}