https://github.com/broadinstitute/xtermcolor

Python library for terminal color support (including 256-color support)

https://github.com/broadinstitute/xtermcolor

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 6 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Python library for terminal color support (including 256-color support)

Basic Info
  • Host: GitHub
  • Owner: broadinstitute
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 538 KB
Statistics
  • Stars: 105
  • Watchers: 21
  • Forks: 10
  • Open Issues: 4
  • Releases: 0
Created over 14 years ago · Last pushed almost 9 years ago
Metadata Files
Readme License

README.md

XTermColor: Easy Terminal Colors

XTermColor is a convenient python module for quickly colorizing text for output to the terminal either via ANSI color code or RGB color value. Support 256 colors!

xtermcolor list

Installation

With pip

bash $ pip install xtermcolor

Or, via easy_install:

bash $ easy_install xtermcolor

Or, Using setup.py from the project directory

bash $ python setup.py install

Command Line Usage

$ xtermcolor --help
usage: xtermcolor [-h] [--color COLOR] [--compat {xterm,vt100}] {convert,list}

xtermcolor: 256 terminal color library

positional arguments:
  {convert,list}        Actions

optional arguments:
  -h, --help            show this help message and exit
  --color COLOR         Color to convert
  --compat {xterm,vt100}
                        Compatibility mode. Defaults to xterm.

To convert an RGB value to a printf() string or the closest ANSI color code, use xtermcolor convert as follows:

xtermcolor convert

Python Module Usage

Simply import the colorize function from the xtermcolor module. colorize() is always called with a string as the first argument, but has a number of keyword arguments that can be specified:

  • rgb - String of the RGB color value to color the text as.
  • ansi - Integer value of the ANSI color code.
  • bg - String of the RGB color value for the background color.
  • ansi_bg - Integer value of ANSI color code for background color.
  • fd - File descriptor that will be used to print the text. Defaults to stdout.

arguments rgb and ansi are mutually exclusive, as are bg and ansi_bg.

xtermcolor module

Owner

  • Name: Broad Institute
  • Login: broadinstitute
  • Kind: organization
  • Location: Cambridge, MA

Broad Institute of MIT and Harvard

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 45
  • Total Committers: 6
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.489
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Salvo 'LtWorf' Tomaselli t****i@t****t 23
Scott Frazer s****r@g****m 15
MrLokans t****1@g****m 3
Scott Frazer s****r@b****g 2
Guillaume Algis g****s@g****m 1
Cory Li c****i@m****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 7
  • Total pull requests: 12
  • Average time to close issues: 1 day
  • Average time to close pull requests: 3 months
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 1.14
  • Average comments per pull request: 0.67
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ltworf (4)
  • piotr-dobrogost (1)
  • bkabrda (1)
  • guillaumealgis (1)
Pull Request Authors
  • ltworf (8)
  • MrLokans (2)
  • Cixelyn (1)
  • guillaumealgis (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 6,366 last-month
  • Total docker downloads: 5,433,906
  • Total dependent packages: 7
  • Total dependent repositories: 36
  • Total versions: 9
  • Total maintainers: 1
pypi.org: xtermcolor

Python module for colorizing output with xterm 256 color support

  • Versions: 9
  • Dependent Packages: 7
  • Dependent Repositories: 36
  • Downloads: 6,366 Last month
  • Docker Downloads: 5,433,906
Rankings
Docker downloads count: 0.5%
Dependent packages count: 1.6%
Dependent repos count: 2.4%
Downloads: 3.2%
Average: 4.3%
Stargazers count: 6.9%
Forks count: 11.4%
Maintainers (1)
Last synced: 11 months ago