clr


Nameclr JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/lmittmann/clr
Summary🌈 Terminal string styling
upload_time2017-01-26 17:06:43
maintainer
docs_urlNone
authorlmittmann
requires_python
licenseMIT
keywords clr color ansi terminal styling chalk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            clr
===

|Build Status| |PyPI version|

**clr** is a simple terminal string styling library. Its API is a port of the popular
`chalk <https://github.com/chalk/chalk>`__ module for javascript.


Install
-------

::

    $ pip install clr


Usage
-----

.. code:: py

    import clr

    print(clr.red.bold('Hello world!'))


API
---

clr.\ ``style*[.style](*objects, sep=' ')``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Chain `styles <#styles>`__ and call the last one as a method with an argument. Order doesn't matter, and later styles
take precedence in case of a conflict, e.g. ``clr.red.yellow.green`` is equivalent to ``clr.green``.

Multiple arguments will be separated by ``sep``, a space by default.


Styles
------

+---------------------+-------------------------------------+-------------------------------------------+
| Modifiers           | Colors                              | Background colors                         |
+=====================+===============+=====================+==================+========================+
| - ``bold``          | - ``black``   | - ``light_black``   | - ``on_black``   | - ``on_light_black``   |
| - ``dim``           | - ``red``     | - ``light_red``     | - ``on_red``     | - ``on_light_red``     |
| - ``italic``        | - ``green``   | - ``light_green``   | - ``on_green``   | - ``on_light_green``   |
| - ``underline``     | - ``yellow``  | - ``light_yellow``  | - ``on_yellow``  | - ``on_light_yellow``  |
| - ``inverse``       | - ``blue``    | - ``light_blue``    | - ``on_blue``    | - ``on_light_blue``    |
| - ``hidden``        | - ``magenta`` | - ``light_magenta`` | - ``on_magenta`` | - ``on_light_magenta`` |
| - ``strikethrough`` | - ``cyan``    | - ``light_cyan``    | - ``on_cyan``    | - ``on_light_cyan``    |
|                     | - ``white``   | - ``light_white``   | - ``on_white``   | - ``on_light_white``   |
+---------------------+---------------+---------------------+------------------+------------------------+


.. |Build Status| image:: https://travis-ci.org/lmittmann/clr.svg?branch=master
    :target: https://travis-ci.org/lmittmann/clr
.. |PyPI version| image:: https://img.shields.io/pypi/v/clr.svg
    :target: https://pypi.python.org/pypi/clr

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lmittmann/clr",
    "name": "clr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "clr,color,ansi,terminal styling,chalk",
    "author": "lmittmann",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/75/8f/22b6b4813e45da30d2411d7c807364e806188beb4a0a41cb8c5f739cb39c/clr-1.0.3.tar.gz",
    "platform": "",
    "description": "clr\n===\n\n|Build Status| |PyPI version|\n\n**clr** is a simple terminal string styling library. Its API is a port of the popular\n`chalk <https://github.com/chalk/chalk>`__ module for javascript.\n\n\nInstall\n-------\n\n::\n\n    $ pip install clr\n\n\nUsage\n-----\n\n.. code:: py\n\n    import clr\n\n    print(clr.red.bold('Hello world!'))\n\n\nAPI\n---\n\nclr.\\ ``style*[.style](*objects, sep=' ')``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nChain `styles <#styles>`__ and call the last one as a method with an argument. Order doesn't matter, and later styles\ntake precedence in case of a conflict, e.g. ``clr.red.yellow.green`` is equivalent to ``clr.green``.\n\nMultiple arguments will be separated by ``sep``, a space by default.\n\n\nStyles\n------\n\n+---------------------+-------------------------------------+-------------------------------------------+\n| Modifiers           | Colors                              | Background colors                         |\n+=====================+===============+=====================+==================+========================+\n| - ``bold``          | - ``black``   | - ``light_black``   | - ``on_black``   | - ``on_light_black``   |\n| - ``dim``           | - ``red``     | - ``light_red``     | - ``on_red``     | - ``on_light_red``     |\n| - ``italic``        | - ``green``   | - ``light_green``   | - ``on_green``   | - ``on_light_green``   |\n| - ``underline``     | - ``yellow``  | - ``light_yellow``  | - ``on_yellow``  | - ``on_light_yellow``  |\n| - ``inverse``       | - ``blue``    | - ``light_blue``    | - ``on_blue``    | - ``on_light_blue``    |\n| - ``hidden``        | - ``magenta`` | - ``light_magenta`` | - ``on_magenta`` | - ``on_light_magenta`` |\n| - ``strikethrough`` | - ``cyan``    | - ``light_cyan``    | - ``on_cyan``    | - ``on_light_cyan``    |\n|                     | - ``white``   | - ``light_white``   | - ``on_white``   | - ``on_light_white``   |\n+---------------------+---------------+---------------------+------------------+------------------------+\n\n\n.. |Build Status| image:: https://travis-ci.org/lmittmann/clr.svg?branch=master\n    :target: https://travis-ci.org/lmittmann/clr\n.. |PyPI version| image:: https://img.shields.io/pypi/v/clr.svg\n    :target: https://pypi.python.org/pypi/clr\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "\ud83c\udf08 Terminal string styling",
    "version": "1.0.3",
    "split_keywords": [
        "clr",
        "color",
        "ansi",
        "terminal styling",
        "chalk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a471fb95dfed94ce26310b54216f868d113cb0202691ae56ee4bca2e931f50b0",
                "md5": "008d74bf1e4ddc400fe91b9bc67de0ba",
                "sha256": "7553f81f7ddc5579e45616ced5fcbdae3941ec817dacf5972d39a156c7cdba1a"
            },
            "downloads": -1,
            "filename": "clr-1.0.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "008d74bf1e4ddc400fe91b9bc67de0ba",
            "packagetype": "bdist_wheel",
            "python_version": "3.5",
            "requires_python": null,
            "size": 4419,
            "upload_time": "2017-01-26T17:06:45",
            "upload_time_iso_8601": "2017-01-26T17:06:45.200472Z",
            "url": "https://files.pythonhosted.org/packages/a4/71/fb95dfed94ce26310b54216f868d113cb0202691ae56ee4bca2e931f50b0/clr-1.0.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "758f22b6b4813e45da30d2411d7c807364e806188beb4a0a41cb8c5f739cb39c",
                "md5": "3ae49eba791b458a4d7b5ba2ab7cc754",
                "sha256": "26505b51f73518d531a52b1f7855488f8c764de94f248ebb7cbe0549acc9d333"
            },
            "downloads": -1,
            "filename": "clr-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3ae49eba791b458a4d7b5ba2ab7cc754",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2610,
            "upload_time": "2017-01-26T17:06:43",
            "upload_time_iso_8601": "2017-01-26T17:06:43.688219Z",
            "url": "https://files.pythonhosted.org/packages/75/8f/22b6b4813e45da30d2411d7c807364e806188beb4a0a41cb8c5f739cb39c/clr-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2017-01-26 17:06:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "lmittmann",
    "github_project": "clr",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "clr"
}
        
Elapsed time: 0.04985s