Metadata-Version: 2.1
Name: console-color
Version: 0.0.2
Summary: print with color on the console.
Home-page: https://github.com/CarsonSlovoka/console-color/tree/master
Author: Carson
Author-email: jackparadise520a@gmail.com
License: BSD 3-Clause
Download-URL: https://github.com/CarsonSlovoka/console-color/tree/master/tarball/v0.0.2
Keywords: library,console,color
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved
Classifier: Natural Language :: Chinese (Traditional)
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6.2,
Description-Content-Type: text/x-rst

==================
Console Color
==================

**print with color on the console.**

Install
============

``pip install console-color``

Features
============

- It allows you to register your own styles.
- Supports fore, background, style (Bold, Italic, URL, ...), and you can do **permutations**, really flexible.
- Well documented, you can find all the usage form `test.py`_ folder and `console_color.ipynb`_

Usage
------

.. code-block:: python

    from console_color import *

    # cprint(text, fg=, bg=, style=)
    cprint('...', RGB.WHITE, '#ff0000', Style.BOLD + Style.URL)
    cprint('...', (255, 0, 0), RGB.YELLOW, Style.BOLD + Style.URL)

    # you can do permutations, for example, you only need style only then
    cprint('...', style=Style.BOLD)

    # combine with normal text
    print('123' + cprint('...', '#ff0000', pf=False) + '~~~')

.. note:: get more help; please reference the `test.py`_  and `console_color.ipynb`_

Demo
==========

.. image:: https://raw.githubusercontent.com/CarsonSlovoka/console-color/release/doc/_static/nav_bar.logo.png


Contributing
===============

If you want to contribute, please use the ``release`` branch as the stable branch. ``dev`` is the future branch for the maintainer.

Be sure to **write tests** for new features. If you have any difficulties, you can ask me or discuss with me. I am glad if you want to join us.

By the way, I'm very friendly! (You can ask me questions with Chinese)

Useful Reference
==================

The below link may help you to understand how do you write, such as this library by yourself.

- `★ ANSI_escape_code <https://en.wikipedia.org/wiki/ANSI_escape_code>`_
- `stackoverflow: how to print colored text in terminal in python <https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python>`_


More
===========

See the `documentation <https://carsonslovoka.github.io/console-color/>`_

.. _test.py: https://github.com/CarsonSlovoka/console-color/blob/release/console_color/test/test.py
.. _console_color.ipynb: https://github.com/CarsonSlovoka/console-color/blob/release/console_color/demo/console_color.ipynb


