{"id":15683953,"url":"https://github.com/thombashi/tcolorpy","last_synced_at":"2025-04-13T15:34:49.690Z","repository":{"id":43644111,"uuid":"259650007","full_name":"thombashi/tcolorpy","owner":"thombashi","description":"tcolopy is a Python library to apply true color for terminal text.","archived":false,"fork":false,"pushed_at":"2024-12-30T14:47:47.000Z","size":420,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T01:15:07.015Z","etag":null,"topics":["python-library","terminal-colors","truecolor"],"latest_commit_sha":null,"homepage":"","language":"Python","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/thombashi.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","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-04-28T13:48:53.000Z","updated_at":"2024-12-30T14:47:50.000Z","dependencies_parsed_at":"2024-05-04T01:03:50.542Z","dependency_job_id":"11bc4b28-c508-477f-adad-51a85468140b","html_url":"https://github.com/thombashi/tcolorpy","commit_stats":{"total_commits":176,"total_committers":4,"mean_commits":44.0,"dds":"0.017045454545454586","last_synced_commit":"0d0fe92b6e598c30d30c7d949642e0f04df0244e"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":"thombashi/python-lib-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Ftcolorpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Ftcolorpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Ftcolorpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thombashi%2Ftcolorpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thombashi","download_url":"https://codeload.github.com/thombashi/tcolorpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248736452,"owners_count":21153598,"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":["python-library","terminal-colors","truecolor"],"created_at":"2024-10-03T17:09:20.403Z","updated_at":"2025-04-13T15:34:49.647Z","avatar_url":"https://github.com/thombashi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. contents:: **tcolorpy**\n   :backlinks: top\n   :depth: 2\n\n\nSummary\n============================================\ntcolopy is a Python library to apply true color for terminal text.\n\n|PyPI pkg ver| |conda pkg ver| |Supported Python implementations| |Supported Python versions| |CI status| |CodeQL| |coverage|\n\n.. |PyPI pkg ver| image:: https://badge.fury.io/py/tcolorpy.svg\n    :target: https://badge.fury.io/py/tcolorpy\n    :alt: PyPI package version\n\n.. |conda pkg ver| image:: https://anaconda.org/conda-forge/tcolorpy/badges/version.svg\n    :target: https://anaconda.org/conda-forge/tcolorpy\n    :alt: conda-forge package version\n\n.. |Supported Python implementations| image:: https://img.shields.io/pypi/implementation/tcolorpy.svg\n    :target: https://pypi.org/project/tcolorpy\n    :alt: Supported Python implementations\n\n.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/tcolorpy.svg\n    :target: https://pypi.org/project/tcolorpy\n    :alt: Supported Python versions\n\n.. |CI status| image:: https://github.com/thombashi/tcolorpy/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/thombashi/tcolorpy/actions/workflows/ci.yml\n    :alt: CI status of Linux/macOS/Windows\n\n.. |CodeQL| image:: https://github.com/thombashi/tcolorpy/actions/workflows/github-code-scanning/codeql/badge.svg\n    :target: https://github.com/thombashi/tcolorpy/actions/workflows/github-code-scanning/codeql\n    :alt: CodeQL\n\n.. |coverage| image:: https://coveralls.io/repos/github/thombashi/tcolorpy/badge.svg?branch=master\n    :target: https://coveralls.io/github/thombashi/tcolorpy?branch=master\n    :alt: Test coverage: coveralls\n\n\nInstallation\n============================================\n\nInstallation: pip\n------------------------------\n::\n\n    pip install tcolorpy\n\nInstallation: conda\n------------------------------\n::\n\n    conda install -c conda-forge tcolorpy\n\n\nUsage\n============================================\n\nLibrary usage\n--------------------------------------------\n\n:Sample Code:\n    .. code-block:: python\n\n        from tcolorpy import tcolor\n\n        print(tcolor(\"tcolopy example\", color=\"#ee1177\", styles=[\"bold\", \"italic\", \"underline\"]))\n\n:Output:\n    .. figure:: https://cdn.jsdelivr.net/gh/thombashi/tcolorpy@master/ss/oneline.png\n        :scale: 60%\n        :alt: https://github.com/thombashi/tcolorpy/blob/master/ss/oneline.png\n\nYou can set the following ``tcolor`` arguments:\n\n- ``color``/``bg_color``\n    - color names (``\"red\"``, ``\"green\"``, etc.) or color code (``\"#RRGGBB\"``)\n- ``styles``\n    - ``\"bold\"``, ``\"italic\"``, etc.\n\n\nOther examples\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nApply true color and styles to text:\n\n.. figure:: https://cdn.jsdelivr.net/gh/thombashi/tcolorpy@master/ss/styles.png\n    :scale: 60%\n    :alt: https://github.com/thombashi/tcolorpy/blob/master/ss/styles.png\n\n    `example source code \u003chttps://github.com/thombashi/tcolorpy/blob/master/examples/ansi_styles.py\u003e`__\n\nYou can also specify colors by name:\n\n.. figure:: https://cdn.jsdelivr.net/gh/thombashi/tcolorpy@master/ss/ansi_colors.png\n    :scale: 60%\n    :alt: https://github.com/thombashi/tcolorpy/blob/master/ss/ansi_colors.png\n\n    `example source code \u003chttps://github.com/thombashi/tcolorpy/blob/master/examples/ansi_colors.py\u003e`__\n\n\nCLI usage\n--------------------------------------------\n``tcolorpy`` can be used via CLI:\n\n::\n\n    $ python3 -m tcolorpy \"tcolopy example\" -c \"#ee1177\" -s bold,italic,underline\n\nCommand help\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n::\n\n    usage: __main__.py [-h] [-c COLOR] [-b BG_COLOR] [-s STYLES] [--encode ENCODE] string\n\n    positional arguments:\n      string                string to apply styles.\n\n    options:\n      -h, --help            show this help message and exit\n      -c COLOR, --color COLOR\n                            specify a color code (#XXXXXX) or a name. valid names are: black, red, green, yellow, blue, magenta, cyan, white, lightblack, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, lightwhite\n      -b BG_COLOR, --bg-color BG_COLOR\n                            specify a background color code (#XXXXXX) or a name. valid names are: black, red, green, yellow, blue, magenta, cyan, white, lightblack, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, lightwhite\n      -s STYLES, --styles STYLES\n                            specify a comma-separated style. valid values are: bold, dim, italic, underline, blink, invert, strike\n      --encode ENCODE       output a text encoded with the specified encoding\n\n\nDependencies\n============================================\nPython 3.9+\nno external dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthombashi%2Ftcolorpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthombashi%2Ftcolorpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthombashi%2Ftcolorpy/lists"}