Skip to main content

Display colored text in the terminal

Project description





pip install colort


from colort import display_style as ds

src = "这是要显示的文本"
dist = ds.format_with_one_style(src,
print("更改文字颜色:", dist)
dist = ds.format_with_one_style(src,
print("更改文字背景色:", dist)
dist = ds.format_with_multiple_styles(src,, ds.mode.underline, ds.mode.bold)
print("多种样式:", dist)



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for colort, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size colort-0.4-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page