.. image:: https://raw.githubusercontent.com/doblabs/ansi-escape-room/release/docs/ansi-escape-room--logo.png
:target: https://github.com/landonb/ansi-escape-room#🐰
.. |colored| replace:: **Colored**
.. _colored: https://dslackw.gitlab.io/colored
**This is a fork of** |colored|_
.. CXREF:
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge
.. image:: https://github.com/doblabs/ansi-escape-room/actions/workflows/checks-unspecial.yml/badge.svg?branch=release
:target: https://github.com/doblabs/ansi-escape-room/actions/workflows/checks-unspecial.yml/badge.svg?branch=release
:alt: Build Status
.. CXREF: https://app.codecov.io/gh/doblabs/ansi-escape-room/settings/badge
.. image:: https://codecov.io/gh/doblabs/ansi-escape-room/graph/badge.svg?token=0t1hfmCDws
:target: https://codecov.io/gh/doblabs/ansi-escape-room
:alt: Coverage Status
.. image:: https://readthedocs.org/projects/ansi-escape-room/badge/?version=latest
:target: https://ansi-escape-room.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://img.shields.io/github/v/release/doblabs/ansi-escape-room.svg?style=flat
:target: https://github.com/doblabs/ansi-escape-room/releases
:alt: GitHub Release Status
.. image:: https://img.shields.io/pypi/v/ansi-escape-room.svg
:target: https://pypi.org/project/ansi-escape-room/
:alt: PyPI Release Status
.. image:: https://img.shields.io/pypi/pyversions/ansi-escape-room.svg
:target: https://pypi.org/project/ansi-escape-room/
:alt: PyPI Supported Python Versions
.. image:: https://img.shields.io/github/license/doblabs/ansi-escape-room.svg?style=flat
:target: https://github.com/doblabs/ansi-escape-room/blob/release/LICENSE
:alt: License Status
About
-----
Very simple Python library for color and formatting in terminal.
Collection of color codes and names for 256 color terminal setups.
The following is a list of 256 colors for Xterm, containing an example
of the displayed color, Xterm Name, Xterm Number and HEX.
Video Demo
----------
.. image:: https://gitlab.com/dslackw/images/raw/master/colored/video.png
:target: https://asciinema.org/a/bgxm6KisSvPkPwMsYLyBBJjth
The following colors works with most terminals and terminals emulators.
ANSI/VT100 escape sequences can be used in every programming languages.
Attributes:
.. code-block:: bash
+-----+------------------+
|Code | Description |
+-----+------------------+
| 1 | bold |
| 2 | dim |
| 3 | italic |
| 4 | underlined |
| 5 | blink |
| 7 | reverse |
| 8 | hidden |
| 0 | reset |
| 21 | res_bold |
| 22 | res_dim |
| 23 | res_italic |
| 24 | res_underlined |
| 25 | res_blink |
| 27 | res_reverse |
| 28 | res_hidden |
+------------------------+
256 Foreground and Background Colors - Full Chart:
.. code-block:: bash
+-----+---------------------+
|Code | Description |
+-----+---------------------+
| 0 | black |
| 1 | red |
| 2 | green |
| 3 | yellow |
| 4 | blue |
| 5 | magenta |
| 6 | cyan |
| 7 | light_gray |
| 8 | dark_gray |
| 9 | light_red |
| 10 | light_green |
| 11 | light_yellow |
| 12 | light_blue |
| 13 | light_magenta |
| 14 | light_cyan |
| 15 | white |
| 16 | grey_0 |
| 17 | navy_blue |
| 18 | dark_blue |
| 19 | blue_3a |
| 20 | blue_3b |
| 21 | blue_1 |
| 22 | dark_green |
| 23 | deep_sky_blue_4a |
| 24 | deep_sky_blue_4b |
| 25 | deep_sky_blue_4c |
| 26 | dodger_blue_3 |
| 27 | dodger_blue_2 |
| 28 | green_4 |
| 29 | spring_green_4 |
| 30 | turquoise_4 |
| 31 | deep_sky_blue_3a |
| 32 | deep_sky_blue_3b |
| 33 | dodger_blue_1 |
| 34 | green_3a |
| 35 | spring_green_3a |
| 36 | dark_cyan |
| 37 | light_sea_green |
| 38 | deep_sky_blue_2 |
| 39 | deep_sky_blue_1 |
| 40 | green_3b |
| 41 | spring_green_3b |
| 42 | spring_green_2a |
| 43 | cyan_3 |
| 44 | dark_turquoise |
| 45 | turquoise_2 |
| 46 | green_1 |
| 47 | spring_green_2b |
| 48 | spring_green_1 |
| 49 | medium_spring_green |
| 50 | cyan_2 |
| 51 | cyan_1 |
| 52 | dark_red_1 |
| 53 | deep_pink_4a |
| 54 | purple_4a |
| 55 | purple_4b |
| 56 | purple_3 |
| 57 | blue_violet |
| 58 | orange_4a |
| 59 | grey_37 |
| 60 | medium_purple_4 |
| 61 | slate_blue_3a |
| 62 | slate_blue_3b |
| 63 | royal_blue_1 |
| 64 | chartreuse_4 |
| 65 | dark_sea_green_4a |
| 66 | pale_turquoise_4 |
| 67 | steel_blue |
| 68 | steel_blue_3 |
| 69 | cornflower_blue |
| 70 | chartreuse_3a |
| 71 | dark_sea_green_4b |
| 72 | cadet_blue_2 |
| 73 | cadet_blue_1 |
| 74 | sky_blue_3 |
| 75 | steel_blue_1a |
| 76 | chartreuse_3b |
| 77 | pale_green_3a |
| 78 | sea_green_3 |
| 79 | aquamarine_3 |
| 80 | medium_turquoise |
| 81 | steel_blue_1b |
| 82 | chartreuse_2a |
| 83 | sea_green_2 |
| 84 | sea_green_1a |
| 85 | sea_green_1b |
| 86 | aquamarine_1a |
| 87 | dark_slate_gray_2 |
| 88 | dark_red_2 |
| 89 | deep_pink_4b |
| 90 | dark_magenta_1 |
| 91 | dark_magenta_2 |
| 92 | dark_violet_1a |
| 93 | purple_1a |
| 94 | orange_4b |
| 95 | light_pink_4 |
| 96 | plum_4 |
| 97 | medium_purple_3a |
| 98 | medium_purple_3b |
| 99 | slate_blue_1 |
| 100 | yellow_4a |
| 101 | wheat_4 |
| 102 | grey_53 |
| 103 | light_slate_grey |
| 104 | medium_purple |
| 105 | light_slate_blue |
| 106 | yellow_4b |
| 107 | dark_olive_green_3a |
| 108 | dark_green_sea |
| 109 | light_sky_blue_3a |
| 110 | light_sky_blue_3b |
| 111 | sky_blue_2 |
| 112 | chartreuse_2b |
| 113 | dark_olive_green_3b |
| 114 | pale_green_3b |
| 115 | dark_sea_green_3a |
| 116 | dark_slate_gray_3 |
| 117 | sky_blue_1 |
| 118 | chartreuse_1 |
| 119 | light_green_2 |
| 120 | light_green_3 |
| 121 | pale_green_1a |
| 122 | aquamarine_1b |
| 123 | dark_slate_gray_1 |
| 124 | red_3a |
| 125 | deep_pink_4c |
| 126 | medium_violet_red |
| 127 | magenta_3a |
| 128 | dark_violet_1b |
| 129 | purple_1b |
| 130 | dark_orange_3a |
| 131 | indian_red_1a |
| 132 | hot_pink_3a |
| 133 | medium_orchid_3 |
| 134 | medium_orchid |
| 135 | medium_purple_2a |
| 136 | dark_goldenrod |
| 137 | light_salmon_3a |
| 138 | rosy_brown |
| 139 | grey_63 |
| 140 | medium_purple_2b |
| 141 | medium_purple_1 |
| 142 | gold_3a |
| 143 | dark_khaki |
| 144 | navajo_white_3 |
| 145 | grey_69 |
| 146 | light_steel_blue_3 |
| 147 | light_steel_blue |
| 148 | yellow_3a |
| 149 | dark_olive_green_3 |
| 150 | dark_sea_green_3b |
| 151 | dark_sea_green_2 |
| 152 | light_cyan_3 |
| 153 | light_sky_blue_1 |
| 154 | green_yellow |
| 155 | dark_olive_green_2 |
| 156 | pale_green_1b |
| 157 | dark_sea_green_5b |
| 158 | dark_sea_green_5a |
| 159 | pale_turquoise_1 |
| 160 | red_3b |
| 161 | deep_pink_3a |
| 162 | deep_pink_3b |
| 163 | magenta_3b |
| 164 | magenta_3c |
| 165 | magenta_2a |
| 166 | dark_orange_3b |
| 167 | indian_red_1b |
| 168 | hot_pink_3b |
| 169 | hot_pink_2 |
| 170 | orchid |
| 171 | medium_orchid_1a |
| 172 | orange_3 |
| 173 | light_salmon_3b |
| 174 | light_pink_3 |
| 175 | pink_3 |
| 176 | plum_3 |
| 177 | violet |
| 178 | gold_3b |
| 179 | light_goldenrod_3 |
| 180 | tan |
| 181 | misty_rose_3 |
| 182 | thistle_3 |
| 183 | plum_2 |
| 184 | yellow_3b |
| 185 | khaki_3 |
| 186 | light_goldenrod_2a |
| 187 | light_yellow_3 |
| 188 | grey_84 |
| 189 | light_steel_blue_1 |
| 190 | yellow_2 |
| 191 | dark_olive_green_1a |
| 192 | dark_olive_green_1b |
| 193 | dark_sea_green_1 |
| 194 | honeydew_2 |
| 195 | light_cyan_1 |
| 196 | red_1 |
| 197 | deep_pink_2 |
| 198 | deep_pink_1a |
| 199 | deep_pink_1b |
| 200 | magenta_2b |
| 201 | magenta_1 |
| 202 | orange_red_1 |
| 203 | indian_red_1c |
| 204 | indian_red_1d |
| 205 | hot_pink_1a |
| 206 | hot_pink_1b |
| 207 | medium_orchid_1b |
| 208 | dark_orange |
| 209 | salmon_1 |
| 210 | light_coral |
| 211 | pale_violet_red_1 |
| 212 | orchid_2 |
| 213 | orchid_1 |
| 214 | orange_1 |
| 215 | sandy_brown |
| 216 | light_salmon_1 |
| 217 | light_pink_1 |
| 218 | pink_1 |
| 219 | plum_1 |
| 220 | gold_1 |
| 221 | light_goldenrod_2b |
| 222 | light_goldenrod_2c |
| 223 | navajo_white_1 |
| 224 | misty_rose1 |
| 225 | thistle_1 |
| 226 | yellow_1 |
| 227 | light_goldenrod_1 |
| 228 | khaki_1 |
| 229 | wheat_1 |
| 230 | cornsilk_1 |
| 231 | grey_100 |
| 232 | grey_3 |
| 233 | grey_7 |
| 234 | grey_11 |
| 235 | grey_15 |
| 236 | grey_19 |
| 237 | grey_23 |
| 238 | grey_27 |
| 239 | grey_30 |
| 240 | grey_35 |
| 241 | grey_39 |
| 242 | grey_42 |
| 243 | grey_46 |
| 244 | grey_50 |
| 245 | grey_54 |
| 246 | grey_58 |
| 247 | grey_62 |
| 248 | grey_66 |
| 249 | grey_70 |
| 250 | grey_74 |
| 251 | grey_78 |
| 252 | grey_82 |
| 253 | grey_85 |
| 254 | grey_89 |
| 255 | grey_93 |
| 256 | default |
+-----+---------------------+
256 Colors Foreground (text):
.. image:: https://gitlab.com/dslackw/images/raw/master/colored/256_colors_fg.png
:alt: 256 fg colors
256 Colors Background:
.. image:: https://gitlab.com/dslackw/images/raw/master/colored/256_colors_bg.png
:alt: 256 bg colors
Installation
------------
.. code-block:: bash
$ pip install ansi-escape-room --upgrade
# Uninstall:
$ pip uninstall ansi-escape-room
Dependencies
------------
None, only Python programming language.
Usage Examples
--------------
How to use the module in your own python code:
.. code-block:: bash
>>> from colored import fg, bg, attr
>>>
>>> print ('%s Hello World !!! %s' % (fg(1), attr(0)))
Hello World !!!
>>>
>>> print ('%s%s Hello World !!! %s' % (fg(1), bg(15), attr(0)))
Hello World !!!
Use description:
.. code-block:: bash
>>> print ('%s%s Hello World !!! %s' % (fg('white'), bg('yellow'), attr('reset')))
Hello World !!!
>>>
>>> print ('%s%s Hello World !!! %s' % (fg('orchid'), attr('bold'), attr('reset')))
Hello World !!!
>>>
>>> color = bg('indian_red_1a') + fg('white')
>>> reset = attr('reset')
>>> print (color + 'Hello World !!!' + reset)
Hello World !!!
Or use HEX code:
.. code-block:: bash
>>> color = fg('#C0C0C0') + bg('#00005f')
>>> res = attr('reset')
>>> print (color + "Hello World !!!" + res)
Hello World !!!
Or the convenient `stylize(text, *styles)` wrapper to save some keystrokes:
.. code-block:: bash
>>> import colored
>>> from colored import stylize
>>> print(stylize("This is green.", colored.fg("green")))
This is green.
>>> print("This is not.")
This is not.
>>> angry = colored.fg("red") + colored.attr("bold")
>>> print(stylize("This is angry text.", angry))
This is angry text.
>>> print(stylize("This is VERY angry text.", angry, colored.attr("underlined")))
This is VERY angry text.
>>> print("But this is not.")
But this is not.
Or the variant `stylize_interactive(text, *styles)` for readline-friendliness:
.. code-block:: bash
>>> import colored, sys
>>> from colored import stylize_interactive, fg
>>> sys.ps1 = stylize_interactive("myPrompt: ", fg('red'))
myPrompt:
Use directly like `colorama <https://pypi.python.org/pypi/colorama>`_ but with more colors:
.. code-block:: bash
>>> from colored import fore, back, style
>>>
>>> print (fore.LIGHT_BLUE + back.RED + style.BOLD + "Hello World !!!" + style.RESET)
Import colored module:
.. code-block:: bash
>>> import colored
>>>
>>> colored.fg(1)
'\x1b[38;5;1m'
>>>
>>> colored.fg(257)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/colored/colored.py", line 381, in fg
return colored(color).foreground()
File "/usr/lib64/python2.7/site-packages/colored/colored.py", line 350, in foreground
color = self.reserve_paint[str(self.color)]
KeyError: '257'
>>>
>>> colored.bg(30)
'\x1b[48;5;30m'
>>>
>>> colored.fore.BLUE
'\x1b[38;5;4m'
etc.
Screenshot:
.. image:: https://gitlab.com/dslackw/images/raw/master/colored/screenshot-2.png
:alt: example
Raw data
{
"_id": null,
"home_page": "",
"name": "ansi-escape-room",
"maintainer": "Tally Bark LLC",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0.0",
"maintainer_email": "doblabs@tallybark.com",
"keywords": "color,colour,paint,ansi,terminal,linux,python",
"author": "Landon Bouma",
"author_email": "doblabs@tallybark.com",
"download_url": "https://files.pythonhosted.org/packages/01/99/e5959774f0c2a54ad96aa79eb585b65ef14f5942da58d3d3f35ab577c560/ansi_escape_room-1.5.3.tar.gz",
"platform": null,
"description": ".. image:: https://raw.githubusercontent.com/doblabs/ansi-escape-room/release/docs/ansi-escape-room--logo.png\n :target: https://github.com/landonb/ansi-escape-room#\ud83d\udc30\n\n.. |colored| replace:: **Colored**\n.. _colored: https://dslackw.gitlab.io/colored\n\n**This is a fork of** |colored|_\n\n.. CXREF:\n https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge\n\n.. image:: https://github.com/doblabs/ansi-escape-room/actions/workflows/checks-unspecial.yml/badge.svg?branch=release\n :target: https://github.com/doblabs/ansi-escape-room/actions/workflows/checks-unspecial.yml/badge.svg?branch=release\n :alt: Build Status\n\n.. CXREF: https://app.codecov.io/gh/doblabs/ansi-escape-room/settings/badge\n\n.. image:: https://codecov.io/gh/doblabs/ansi-escape-room/graph/badge.svg?token=0t1hfmCDws\n :target: https://codecov.io/gh/doblabs/ansi-escape-room\n :alt: Coverage Status\n\n.. image:: https://readthedocs.org/projects/ansi-escape-room/badge/?version=latest\n :target: https://ansi-escape-room.readthedocs.io/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/github/v/release/doblabs/ansi-escape-room.svg?style=flat\n :target: https://github.com/doblabs/ansi-escape-room/releases\n :alt: GitHub Release Status\n\n.. image:: https://img.shields.io/pypi/v/ansi-escape-room.svg\n :target: https://pypi.org/project/ansi-escape-room/\n :alt: PyPI Release Status\n\n.. image:: https://img.shields.io/pypi/pyversions/ansi-escape-room.svg\n :target: https://pypi.org/project/ansi-escape-room/\n :alt: PyPI Supported Python Versions\n\n.. image:: https://img.shields.io/github/license/doblabs/ansi-escape-room.svg?style=flat\n :target: https://github.com/doblabs/ansi-escape-room/blob/release/LICENSE\n :alt: License Status\n\nAbout\n-----\n\nVery simple Python library for color and formatting in terminal.\nCollection of color codes and names for 256 color terminal setups.\nThe following is a list of 256 colors for Xterm, containing an example\nof the displayed color, Xterm Name, Xterm Number and HEX.\n\nVideo Demo\n----------\n\n.. image:: https://gitlab.com/dslackw/images/raw/master/colored/video.png\n :target: https://asciinema.org/a/bgxm6KisSvPkPwMsYLyBBJjth\n\nThe following colors works with most terminals and terminals emulators.\nANSI/VT100 escape sequences can be used in every programming languages.\n\nAttributes:\n\n.. code-block:: bash\n\n +-----+------------------+\n |Code | Description |\n +-----+------------------+\n | 1 | bold |\n | 2 | dim |\n | 3 | italic |\n | 4 | underlined |\n | 5 | blink |\n | 7 | reverse |\n | 8 | hidden |\n | 0 | reset |\n | 21 | res_bold |\n | 22 | res_dim |\n | 23 | res_italic |\n | 24 | res_underlined |\n | 25 | res_blink |\n | 27 | res_reverse |\n | 28 | res_hidden |\n +------------------------+\n\n\n256 Foreground and Background Colors - Full Chart:\n\n.. code-block:: bash\n\n +-----+---------------------+\n |Code | Description |\n +-----+---------------------+\n | 0 | black |\n | 1 | red |\n | 2 | green |\n | 3 | yellow |\n | 4 | blue |\n | 5 | magenta |\n | 6 | cyan |\n | 7 | light_gray |\n | 8 | dark_gray |\n | 9 | light_red |\n | 10 | light_green |\n | 11 | light_yellow |\n | 12 | light_blue |\n | 13 | light_magenta |\n | 14 | light_cyan |\n | 15 | white |\n | 16 | grey_0 |\n | 17 | navy_blue |\n | 18 | dark_blue |\n | 19 | blue_3a |\n | 20 | blue_3b |\n | 21 | blue_1 |\n | 22 | dark_green |\n | 23 | deep_sky_blue_4a |\n | 24 | deep_sky_blue_4b |\n | 25 | deep_sky_blue_4c |\n | 26 | dodger_blue_3 |\n | 27 | dodger_blue_2 |\n | 28 | green_4 |\n | 29 | spring_green_4 |\n | 30 | turquoise_4 |\n | 31 | deep_sky_blue_3a |\n | 32 | deep_sky_blue_3b |\n | 33 | dodger_blue_1 |\n | 34 | green_3a |\n | 35 | spring_green_3a |\n | 36 | dark_cyan |\n | 37 | light_sea_green |\n | 38 | deep_sky_blue_2 |\n | 39 | deep_sky_blue_1 |\n | 40 | green_3b |\n | 41 | spring_green_3b |\n | 42 | spring_green_2a |\n | 43 | cyan_3 |\n | 44 | dark_turquoise |\n | 45 | turquoise_2 |\n | 46 | green_1 |\n | 47 | spring_green_2b |\n | 48 | spring_green_1 |\n | 49 | medium_spring_green |\n | 50 | cyan_2 |\n | 51 | cyan_1 |\n | 52 | dark_red_1 |\n | 53 | deep_pink_4a |\n | 54 | purple_4a |\n | 55 | purple_4b |\n | 56 | purple_3 |\n | 57 | blue_violet |\n | 58 | orange_4a |\n | 59 | grey_37 |\n | 60 | medium_purple_4 |\n | 61 | slate_blue_3a |\n | 62 | slate_blue_3b |\n | 63 | royal_blue_1 |\n | 64 | chartreuse_4 |\n | 65 | dark_sea_green_4a |\n | 66 | pale_turquoise_4 |\n | 67 | steel_blue |\n | 68 | steel_blue_3 |\n | 69 | cornflower_blue |\n | 70 | chartreuse_3a |\n | 71 | dark_sea_green_4b |\n | 72 | cadet_blue_2 |\n | 73 | cadet_blue_1 |\n | 74 | sky_blue_3 |\n | 75 | steel_blue_1a |\n | 76 | chartreuse_3b |\n | 77 | pale_green_3a |\n | 78 | sea_green_3 |\n | 79 | aquamarine_3 |\n | 80 | medium_turquoise |\n | 81 | steel_blue_1b |\n | 82 | chartreuse_2a |\n | 83 | sea_green_2 |\n | 84 | sea_green_1a |\n | 85 | sea_green_1b |\n | 86 | aquamarine_1a |\n | 87 | dark_slate_gray_2 |\n | 88 | dark_red_2 |\n | 89 | deep_pink_4b |\n | 90 | dark_magenta_1 |\n | 91 | dark_magenta_2 |\n | 92 | dark_violet_1a |\n | 93 | purple_1a |\n | 94 | orange_4b |\n | 95 | light_pink_4 |\n | 96 | plum_4 |\n | 97 | medium_purple_3a |\n | 98 | medium_purple_3b |\n | 99 | slate_blue_1 |\n | 100 | yellow_4a |\n | 101 | wheat_4 |\n | 102 | grey_53 |\n | 103 | light_slate_grey |\n | 104 | medium_purple |\n | 105 | light_slate_blue |\n | 106 | yellow_4b |\n | 107 | dark_olive_green_3a |\n | 108 | dark_green_sea |\n | 109 | light_sky_blue_3a |\n | 110 | light_sky_blue_3b |\n | 111 | sky_blue_2 |\n | 112 | chartreuse_2b |\n | 113 | dark_olive_green_3b |\n | 114 | pale_green_3b |\n | 115 | dark_sea_green_3a |\n | 116 | dark_slate_gray_3 |\n | 117 | sky_blue_1 |\n | 118 | chartreuse_1 |\n | 119 | light_green_2 |\n | 120 | light_green_3 |\n | 121 | pale_green_1a |\n | 122 | aquamarine_1b |\n | 123 | dark_slate_gray_1 |\n | 124 | red_3a |\n | 125 | deep_pink_4c |\n | 126 | medium_violet_red |\n | 127 | magenta_3a |\n | 128 | dark_violet_1b |\n | 129 | purple_1b |\n | 130 | dark_orange_3a |\n | 131 | indian_red_1a |\n | 132 | hot_pink_3a |\n | 133 | medium_orchid_3 |\n | 134 | medium_orchid |\n | 135 | medium_purple_2a |\n | 136 | dark_goldenrod |\n | 137 | light_salmon_3a |\n | 138 | rosy_brown |\n | 139 | grey_63 |\n | 140 | medium_purple_2b |\n | 141 | medium_purple_1 |\n | 142 | gold_3a |\n | 143 | dark_khaki |\n | 144 | navajo_white_3 |\n | 145 | grey_69 |\n | 146 | light_steel_blue_3 |\n | 147 | light_steel_blue |\n | 148 | yellow_3a |\n | 149 | dark_olive_green_3 |\n | 150 | dark_sea_green_3b |\n | 151 | dark_sea_green_2 |\n | 152 | light_cyan_3 |\n | 153 | light_sky_blue_1 |\n | 154 | green_yellow |\n | 155 | dark_olive_green_2 |\n | 156 | pale_green_1b |\n | 157 | dark_sea_green_5b |\n | 158 | dark_sea_green_5a |\n | 159 | pale_turquoise_1 |\n | 160 | red_3b |\n | 161 | deep_pink_3a |\n | 162 | deep_pink_3b |\n | 163 | magenta_3b |\n | 164 | magenta_3c |\n | 165 | magenta_2a |\n | 166 | dark_orange_3b |\n | 167 | indian_red_1b |\n | 168 | hot_pink_3b |\n | 169 | hot_pink_2 |\n | 170 | orchid |\n | 171 | medium_orchid_1a |\n | 172 | orange_3 |\n | 173 | light_salmon_3b |\n | 174 | light_pink_3 |\n | 175 | pink_3 |\n | 176 | plum_3 |\n | 177 | violet |\n | 178 | gold_3b |\n | 179 | light_goldenrod_3 |\n | 180 | tan |\n | 181 | misty_rose_3 |\n | 182 | thistle_3 |\n | 183 | plum_2 |\n | 184 | yellow_3b |\n | 185 | khaki_3 |\n | 186 | light_goldenrod_2a |\n | 187 | light_yellow_3 |\n | 188 | grey_84 |\n | 189 | light_steel_blue_1 |\n | 190 | yellow_2 |\n | 191 | dark_olive_green_1a |\n | 192 | dark_olive_green_1b |\n | 193 | dark_sea_green_1 |\n | 194 | honeydew_2 |\n | 195 | light_cyan_1 |\n | 196 | red_1 |\n | 197 | deep_pink_2 |\n | 198 | deep_pink_1a |\n | 199 | deep_pink_1b |\n | 200 | magenta_2b |\n | 201 | magenta_1 |\n | 202 | orange_red_1 |\n | 203 | indian_red_1c |\n | 204 | indian_red_1d |\n | 205 | hot_pink_1a |\n | 206 | hot_pink_1b |\n | 207 | medium_orchid_1b |\n | 208 | dark_orange |\n | 209 | salmon_1 |\n | 210 | light_coral |\n | 211 | pale_violet_red_1 |\n | 212 | orchid_2 |\n | 213 | orchid_1 |\n | 214 | orange_1 |\n | 215 | sandy_brown |\n | 216 | light_salmon_1 |\n | 217 | light_pink_1 |\n | 218 | pink_1 |\n | 219 | plum_1 |\n | 220 | gold_1 |\n | 221 | light_goldenrod_2b |\n | 222 | light_goldenrod_2c |\n | 223 | navajo_white_1 |\n | 224 | misty_rose1 |\n | 225 | thistle_1 |\n | 226 | yellow_1 |\n | 227 | light_goldenrod_1 |\n | 228 | khaki_1 |\n | 229 | wheat_1 |\n | 230 | cornsilk_1 |\n | 231 | grey_100 |\n | 232 | grey_3 |\n | 233 | grey_7 |\n | 234 | grey_11 |\n | 235 | grey_15 |\n | 236 | grey_19 |\n | 237 | grey_23 |\n | 238 | grey_27 |\n | 239 | grey_30 |\n | 240 | grey_35 |\n | 241 | grey_39 |\n | 242 | grey_42 |\n | 243 | grey_46 |\n | 244 | grey_50 |\n | 245 | grey_54 |\n | 246 | grey_58 |\n | 247 | grey_62 |\n | 248 | grey_66 |\n | 249 | grey_70 |\n | 250 | grey_74 |\n | 251 | grey_78 |\n | 252 | grey_82 |\n | 253 | grey_85 |\n | 254 | grey_89 |\n | 255 | grey_93 |\n | 256 | default |\n +-----+---------------------+\n\n256 Colors Foreground (text):\n\n.. image:: https://gitlab.com/dslackw/images/raw/master/colored/256_colors_fg.png\n :alt: 256 fg colors\n\n256 Colors Background:\n\n.. image:: https://gitlab.com/dslackw/images/raw/master/colored/256_colors_bg.png\n :alt: 256 bg colors\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n $ pip install ansi-escape-room --upgrade\n\n # Uninstall:\n\n $ pip uninstall ansi-escape-room\n\n\nDependencies\n------------\n\nNone, only Python programming language.\n\nUsage Examples\n--------------\n\nHow to use the module in your own python code:\n\n.. code-block:: bash\n\n >>> from colored import fg, bg, attr\n >>>\n >>> print ('%s Hello World !!! %s' % (fg(1), attr(0)))\n Hello World !!!\n >>>\n >>> print ('%s%s Hello World !!! %s' % (fg(1), bg(15), attr(0)))\n Hello World !!!\n\nUse description:\n\n.. code-block:: bash\n\n >>> print ('%s%s Hello World !!! %s' % (fg('white'), bg('yellow'), attr('reset')))\n Hello World !!!\n >>>\n >>> print ('%s%s Hello World !!! %s' % (fg('orchid'), attr('bold'), attr('reset')))\n Hello World !!!\n >>>\n >>> color = bg('indian_red_1a') + fg('white')\n >>> reset = attr('reset')\n >>> print (color + 'Hello World !!!' + reset)\n Hello World !!!\n\nOr use HEX code:\n\n.. code-block:: bash\n\n >>> color = fg('#C0C0C0') + bg('#00005f')\n >>> res = attr('reset')\n >>> print (color + \"Hello World !!!\" + res)\n Hello World !!!\n\nOr the convenient `stylize(text, *styles)` wrapper to save some keystrokes:\n\n.. code-block:: bash\n\n >>> import colored\n >>> from colored import stylize\n >>> print(stylize(\"This is green.\", colored.fg(\"green\")))\n This is green.\n >>> print(\"This is not.\")\n This is not.\n >>> angry = colored.fg(\"red\") + colored.attr(\"bold\")\n >>> print(stylize(\"This is angry text.\", angry))\n This is angry text.\n >>> print(stylize(\"This is VERY angry text.\", angry, colored.attr(\"underlined\")))\n This is VERY angry text.\n >>> print(\"But this is not.\")\n But this is not.\n\nOr the variant `stylize_interactive(text, *styles)` for readline-friendliness:\n\n.. code-block:: bash\n\n >>> import colored, sys\n >>> from colored import stylize_interactive, fg\n >>> sys.ps1 = stylize_interactive(\"myPrompt: \", fg('red'))\n myPrompt:\n\nUse directly like `colorama <https://pypi.python.org/pypi/colorama>`_ but with more colors:\n\n.. code-block:: bash\n\n >>> from colored import fore, back, style\n >>>\n >>> print (fore.LIGHT_BLUE + back.RED + style.BOLD + \"Hello World !!!\" + style.RESET)\n\nImport colored module:\n\n.. code-block:: bash\n\n >>> import colored\n >>>\n >>> colored.fg(1)\n '\\x1b[38;5;1m'\n >>>\n >>> colored.fg(257)\n Traceback (most recent call last):\n File \"<input>\", line 1, in <module>\n File \"/usr/lib64/python2.7/site-packages/colored/colored.py\", line 381, in fg\n return colored(color).foreground()\n File \"/usr/lib64/python2.7/site-packages/colored/colored.py\", line 350, in foreground\n color = self.reserve_paint[str(self.color)]\n KeyError: '257'\n >>>\n >>> colored.bg(30)\n '\\x1b[48;5;30m'\n >>>\n >>> colored.fore.BLUE\n '\\x1b[38;5;4m'\n\n etc.\n\n\nScreenshot:\n\n.. image:: https://gitlab.com/dslackw/images/raw/master/colored/screenshot-2.png\n :alt: example\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple library for color and formatting to terminal",
"version": "1.5.3",
"project_urls": {
"documentation": "https://ansi-escape-room.readthedocs.io/en/latest",
"download": "https://pypi.org/project/ansi-escape-room/#files",
"history": "https://github.com/doblabs/ansi-escape-room/blob/release/HISTORY.rst",
"homepage": "https://github.com/doblabs/ansi-escape-room#\ud83d\udc30",
"issues": "https://github.com/doblabs/ansi-escape-room/issues"
},
"split_keywords": [
"color",
"colour",
"paint",
"ansi",
"terminal",
"linux",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "30f4be6df28f042f7a54478b40fd662cd7e7d69191661102b28d40a6c587d41e",
"md5": "67b07f80bef8866b071ff54e27324790",
"sha256": "199b2dd8cc02ce977b0a3486c753d3ce2c252bcda2c0342148ac966237640cf3"
},
"downloads": -1,
"filename": "ansi_escape_room-1.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "67b07f80bef8866b071ff54e27324790",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0.0",
"size": 15479,
"upload_time": "2023-12-28T05:00:36",
"upload_time_iso_8601": "2023-12-28T05:00:36.501326Z",
"url": "https://files.pythonhosted.org/packages/30/f4/be6df28f042f7a54478b40fd662cd7e7d69191661102b28d40a6c587d41e/ansi_escape_room-1.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0199e5959774f0c2a54ad96aa79eb585b65ef14f5942da58d3d3f35ab577c560",
"md5": "2a766113e27b867b9a7e1cc401da4269",
"sha256": "5fd4535858048013280ee01cc1e974ee82fb4ef728881c1615004a04e3af9cb0"
},
"downloads": -1,
"filename": "ansi_escape_room-1.5.3.tar.gz",
"has_sig": false,
"md5_digest": "2a766113e27b867b9a7e1cc401da4269",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0.0",
"size": 44907,
"upload_time": "2023-12-28T05:00:38",
"upload_time_iso_8601": "2023-12-28T05:00:38.454372Z",
"url": "https://files.pythonhosted.org/packages/01/99/e5959774f0c2a54ad96aa79eb585b65ef14f5942da58d3d3f35ab577c560/ansi_escape_room-1.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-28 05:00:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "doblabs",
"github_project": "ansi-escape-room",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "ansi-escape-room"
}