Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
ANSI color formatting for output in terminal
Basic Info
- Host: GitHub
- Owner: termcolor
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/termcolor/
- Size: 190 KB
Statistics
- Stars: 289
- Watchers: 4
- Forks: 34
- Open Issues: 5
- Releases: 18
Topics
Metadata Files
README.md
termcolor
Installation
From PyPI
bash
python3 -m pip install --upgrade termcolor
From source
bash
git clone https://github.com/termcolor/termcolor
cd termcolor
python3 -m pip install .
Demo
To see demo output, run:
bash
python3 -m termcolor
Example
```python import sys
from termcolor import colored, cprint
text = colored("Hello, World!", "red", attrs=["reverse", "blink"]) print(text) cprint("Hello, World!", "green", "on_red")
printredoncyan = lambda x: cprint(x, "red", "oncyan") printredoncyan("Hello, World!") printredoncyan("Hello, Universe!")
for i in range(10): cprint(i, "magenta", end=" ")
cprint("Attention!", "red", attrs=["bold"], file=sys.stderr)
You can also specify 0-255 RGB ints via a tuple
cprint("Both foreground and background can use tuples", (100, 150, 250), (50, 60, 70)) ```
Text properties
| Text colors | Text highlights | Attributes |
| --------------- | ------------------ | ----------- |
| black | on_black | bold |
| red | on_red | dark |
| green | on_green | underline |
| yellow | on_yellow | blink |
| blue | on_blue | reverse |
| magenta | on_magenta | concealed |
| cyan | on_cyan | strike |
| white | on_white | |
| light_grey | on_light_grey | |
| dark_grey | on_dark_grey | |
| light_red | on_light_red | |
| light_green | on_light_green | |
| light_yellow | on_light_yellow | |
| light_blue | on_light_blue | |
| light_magenta | on_light_magenta | |
| light_cyan | on_light_cyan | |
You can also use any arbitrary RGB color specified as a tuple of 0-255 integers, for
example, (100, 150, 250).
Terminal properties
| Terminal | bold | dark | underline | blink | reverse | concealed | | ------------ | ------- | ---- | --------- | ---------- | ------- | --------- | | xterm | yes | no | yes | bold | yes | yes | | linux | yes | yes | bold | yes | yes | no | | rxvt | yes | no | yes | bold/black | yes | no | | dtterm | yes | yes | yes | reverse | yes | yes | | teraterm | reverse | no | yes | rev/red | yes | no | | aixterm | normal | no | yes | no | yes | yes | | PuTTY | color | no | yes | no | yes | no | | Windows | no | no | no | no | yes | no | | Cygwin SSH | yes | no | color | color | color | yes | | Mac Terminal | yes | no | yes | yes | yes | yes |
Overrides
Terminal colour detection can be disabled or enabled in several ways.
In order of precedence:
- Calling
coloredorcprintwith a truthyno_colordisables colour. - Calling
coloredorcprintwith a truthyforce_colorforces colour. - Setting the
ANSI_COLORS_DISABLEDenvironment variable to any non-empty value disables colour. - Setting the
NO_COLORenvironment variable to any non-empty value disables colour. - Setting the
FORCE_COLORenvironment variable to any non-empty value forces colour. - Setting the
TERMenvironment variable todumb, or using such a dumb terminal, disables colour. - Finally, termcolor will attempt to detect whether the terminal supports colour.
Owner
- Name: termcolor
- Login: termcolor
- Kind: organization
- Repositories: 1
- Profile: https://github.com/termcolor
GitHub Events
Total
- Create event: 6
- Release event: 3
- Issues event: 12
- Watch event: 63
- Delete event: 4
- Issue comment event: 41
- Push event: 23
- Pull request review comment event: 8
- Pull request review event: 7
- Pull request event: 45
- Fork event: 7
Last Year
- Create event: 6
- Release event: 3
- Issues event: 12
- Watch event: 63
- Delete event: 4
- Issue comment event: 41
- Push event: 23
- Pull request review comment event: 8
- Pull request review event: 7
- Pull request event: 45
- Fork event: 7
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hugo van Kemenade | h****k | 97 |
| pre-commit-ci[bot] | 6****] | 17 |
| renovate[bot] | 2****] | 9 |
| Mike Fiedler | m****n@g****m | 7 |
| seomac | i****s@h****m | 6 |
| Xiaoli Chan | 2****7@q****m | 4 |
| Jon Dufresne | j****e@g****m | 3 |
| Tim Metzler | 3****l | 1 |
| Marcin Serwin | m****0@p****m | 1 |
| Felix Yan | f****s@a****g | 1 |
| Christian | c****r@g****m | 1 |
| Arseniy Potapov | a****v@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 28
- Total pull requests: 124
- Average time to close issues: 5 months
- Average time to close pull requests: 10 days
- Total issue authors: 26
- Total pull request authors: 16
- Average comments per issue: 2.96
- Average comments per pull request: 1.38
- Merged pull requests: 103
- Bot issues: 1
- Bot pull requests: 33
Past Year
- Issues: 7
- Pull requests: 56
- Average time to close issues: 11 days
- Average time to close pull requests: 4 days
- Issue authors: 7
- Pull request authors: 7
- Average comments per issue: 0.86
- Average comments per pull request: 1.34
- Merged pull requests: 46
- Bot issues: 0
- Bot pull requests: 9
Top Authors
Issue Authors
- hugovk (3)
- mtelka (1)
- Ax1rc (1)
- sinux-l5d (1)
- FoxKeys (1)
- bulletmark (1)
- renovate[bot] (1)
- alx-xlx (1)
- charpercyr (1)
- tdprime (1)
- lucalista (1)
- avdstaaij (1)
- bwoodsend (1)
- mcrutch (1)
- webknjaz (1)
Pull Request Authors
- hugovk (58)
- renovate[bot] (18)
- pre-commit-ci[bot] (15)
- miketheman (12)
- Josecolin99 (5)
- MilesWK (2)
- telectr (2)
- BobTheBuidler (2)
- icyveins7 (2)
- jdufresne (2)
- CozyDoomer (1)
- felixonmars (1)
- tmetzl (1)
- canTuncPekkan (1)
- marcin-serwin (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- homebrew 35 last-month
- pypi 63,406,427 last-month
- Total docker downloads: 1,633,881,886
-
Total dependent packages: 1,466
(may contain duplicates) -
Total dependent repositories: 59,506
(may contain duplicates) - Total versions: 25
- Total maintainers: 1
pypi.org: termcolor
ANSI color formatting for output in terminal
- Homepage: https://github.com/termcolor/termcolor
- Documentation: https://termcolor.readthedocs.io/
- License: mit
-
Latest release: 3.1.0
published 10 months ago
Rankings
Maintainers (1)
conda-forge.org: termcolor
- Homepage: https://github.com/termcolor/termcolor
- License: MIT
-
Latest release: 2.1.0
published over 3 years ago
Rankings
anaconda.org: termcolor
ANSI color formatting for output in terminal.
- Homepage: https://github.com/termcolor/termcolor
- License: MIT
-
Latest release: 2.1.0
published over 3 years ago
Rankings
formulae.brew.sh: python-termcolor
ANSI color formatting for output in terminal
- Homepage: https://github.com/termcolor/termcolor
- License: MIT
- Status: removed
-
Latest release: 2.4.0
published about 2 years ago
Rankings
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- micnncim/action-label-syncer v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pre-commit/action v3.0.0 composite
- release-drafter/release-drafter v5 composite
- mheap/github-action-required-labels v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite