Name | chromaconsole JSON |
Version |
0.8.6.2
JSON |
| download |
home_page | |
Summary | A small colorful module to change text colors in terminal |
upload_time | 2024-02-28 12:12:55 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3 |
license | |
keywords |
color
console
terminal
text
style
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Chroma Console
Chroma console is a python package for adding color and style to terminal text output using ANSI escape codes.
* if ***requests*** is installed this package updates automaticaly
* some terminals still don't support *ANSI escape*
<br>
## Installation
```shell
pip install chromaconsole
```
<br>
### How styling works
This package works using ***[ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)***
<br>
## Functions
<details>
<summary>Click here to see all functions</summary>
```python
#styling
Styling.disable()
Styling.enable()
Style.reset()
Style.bold()
Style.faint()
Style.italic()
Style.underlined()
Style.slow_blink()
Style.rapid_blink()
Style.reverse()
Style.hidden()
Style.strikethrough()
Style.doubly_underlined()
Style.normal_intensity()
Style.not_italic()
Style.not_underlined()
Style.not_blinking()
Style.proportional_spacing()
Style.not_reversed()
Style.reveal()
Style.not_strikethrough()
Style.not_proportional_spacing()
Style.overlined()
Style.not_overlined()
Style.minecraft(*args)
#coloring
Color.text(*args)
Color.text_gradient("text", color, color)
Color.default_text()
Color.background(*args)
Color.background_gradient("text", color, color)
Color.default_background()
Color.Text.black()
Color.Text.red()
Color.Text.green()
Color.Text.yellow()
Color.Text.blue()
Color.Text.magenta()
Color.Text.cyan()
Color.Text.white()
Color.Text.br_black()
Color.Text.br_red()
Color.Text.br_green()
Color.Text.br_yellow()
Color.Text.br_blue()
Color.Text.br_magenta()
Color.Text.br_cyan()
Color.Text.br_white()
Color.Background.black()
Color.Background.red()
Color.Background.green()
Color.Background.yellow()
Color.Background.blue()
Color.Background.magenta()
Color.Background.cyan()
Color.Background.white()
Color.Background.br_black()
Color.Background.br_red()
Color.Background.br_green()
Color.Background.br_yellow()
Color.Background.br_blue()
Color.Background.br_magenta()
Color.Background.br_cyan()
Color.Background.br_white()
#some other things (not finished)
Console.clr_scr_to_end()
Console.clr_scr_to_begin()
Console.clr_entire_scr()
Console.clr_line_to_end()
Console.clr_line_to_begin()
Console.clr_entire_line()
Console.scroll_up(int)
Console.scroll_down(int)
Console.bell()
Console.save_cursor()
Console.restore_cursor()
Console.switch_alt_scr()
Console.switch_orig_scr()
Console.show_cursor()
Console.hide_cursor()
```
</details>
<br>
## Example usage
```python
from chromaconsole import *
print(f"{Color.Text.red()}here is red colored text{Style.reset()}")
print(f"{Color.text(r, g, b)}here is RGB colored text{Style.reset()}")
print(f"{Color.background(r, g, b)}here is RGB colored background{Style.reset()}")
print(f"{Color.text('#rrggbb')}here is HEX colored text{Style.reset()}")
print(f"{Color.background('#rrggbb')}here is HEX colored background{Style.reset()}")
print(f"{Style.bold()}Bold {Style.reset()}")
print(f"{Style.italic()}Italic {Style.reset()}")
print(f"{Style.underlined()}Underlined {Style.reset()}")
print(f"{Style.strikethrough()}Strikethrough {Style.reset()}")
print(f"{Style.bold()}{Style.italic()}bold+italic {Style.reset()}")
print(f"{Style.minecraft('§','§ahello §4world§r')}")
```
<br>
## .enable() and .disable():
After executing the `Styling.disable()` command, the system will no longer apply coloring and styling to the content. To re-enable these features, simply use the `Styling.enable()` command.
```python
from chromaconsole import Styling
#disable the coloring and styling
Styling.disable()
print(f"{Color.text(r, g, b)}text without color and style{Style.reset()}")
Styling.enable()
print(f"{Color.text(r, g, b)}text with color and style{Style.reset()}")
```
Raw data
{
"_id": null,
"home_page": "",
"name": "chromaconsole",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "color,console,terminal,text,style",
"author": "",
"author_email": "Umit Tasdelen <umittadelen1277@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8f/07/32c3ed5af3794bda5c935984b0da694cb3d8ab21b3880ac8eb5357f03c07/chromaconsole-0.8.6.2.tar.gz",
"platform": null,
"description": "# Chroma Console\r\n\r\nChroma console is a python package for adding color and style to terminal text output using ANSI escape codes.\r\n\r\n* if ***requests*** is installed this package updates automaticaly\r\n* some terminals still don't support *ANSI escape*\r\n\r\n<br>\r\n\r\n## Installation\r\n\r\n```shell\r\npip install chromaconsole\r\n```\r\n\r\n<br>\r\n\r\n### How styling works\r\nThis package works using ***[ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)***\r\n\r\n<br>\r\n\r\n## Functions\r\n<details>\r\n<summary>Click here to see all functions</summary>\r\n\r\n```python\r\n#styling\r\nStyling.disable()\r\nStyling.enable()\r\nStyle.reset()\r\nStyle.bold()\r\nStyle.faint()\r\nStyle.italic()\r\nStyle.underlined()\r\nStyle.slow_blink()\r\nStyle.rapid_blink()\r\nStyle.reverse()\r\nStyle.hidden()\r\nStyle.strikethrough()\r\nStyle.doubly_underlined()\r\nStyle.normal_intensity()\r\nStyle.not_italic()\r\nStyle.not_underlined()\r\nStyle.not_blinking()\r\nStyle.proportional_spacing()\r\nStyle.not_reversed()\r\nStyle.reveal()\r\nStyle.not_strikethrough()\r\nStyle.not_proportional_spacing()\r\nStyle.overlined()\r\nStyle.not_overlined()\r\nStyle.minecraft(*args)\r\n\r\n#coloring\r\nColor.text(*args)\r\nColor.text_gradient(\"text\", color, color)\r\nColor.default_text()\r\nColor.background(*args)\r\nColor.background_gradient(\"text\", color, color)\r\nColor.default_background()\r\nColor.Text.black()\r\nColor.Text.red()\r\nColor.Text.green()\r\nColor.Text.yellow()\r\nColor.Text.blue()\r\nColor.Text.magenta()\r\nColor.Text.cyan()\r\nColor.Text.white()\r\nColor.Text.br_black()\r\nColor.Text.br_red()\r\nColor.Text.br_green()\r\nColor.Text.br_yellow()\r\nColor.Text.br_blue()\r\nColor.Text.br_magenta()\r\nColor.Text.br_cyan()\r\nColor.Text.br_white()\r\nColor.Background.black()\r\nColor.Background.red()\r\nColor.Background.green()\r\nColor.Background.yellow()\r\nColor.Background.blue()\r\nColor.Background.magenta()\r\nColor.Background.cyan()\r\nColor.Background.white()\r\nColor.Background.br_black()\r\nColor.Background.br_red()\r\nColor.Background.br_green()\r\nColor.Background.br_yellow()\r\nColor.Background.br_blue()\r\nColor.Background.br_magenta()\r\nColor.Background.br_cyan()\r\nColor.Background.br_white()\r\n\r\n#some other things (not finished)\r\nConsole.clr_scr_to_end()\r\nConsole.clr_scr_to_begin()\r\nConsole.clr_entire_scr()\r\nConsole.clr_line_to_end()\r\nConsole.clr_line_to_begin()\r\nConsole.clr_entire_line()\r\nConsole.scroll_up(int)\r\nConsole.scroll_down(int)\r\nConsole.bell()\r\nConsole.save_cursor()\r\nConsole.restore_cursor()\r\nConsole.switch_alt_scr()\r\nConsole.switch_orig_scr()\r\nConsole.show_cursor()\r\nConsole.hide_cursor()\r\n```\r\n</details>\r\n\r\n<br>\r\n\r\n## Example usage\r\n\r\n```python\r\nfrom chromaconsole import *\r\n\r\nprint(f\"{Color.Text.red()}here is red colored text{Style.reset()}\")\r\nprint(f\"{Color.text(r, g, b)}here is RGB colored text{Style.reset()}\")\r\nprint(f\"{Color.background(r, g, b)}here is RGB colored background{Style.reset()}\")\r\n\r\nprint(f\"{Color.text('#rrggbb')}here is HEX colored text{Style.reset()}\")\r\nprint(f\"{Color.background('#rrggbb')}here is HEX colored background{Style.reset()}\")\r\n\r\nprint(f\"{Style.bold()}Bold {Style.reset()}\")\r\nprint(f\"{Style.italic()}Italic {Style.reset()}\")\r\nprint(f\"{Style.underlined()}Underlined {Style.reset()}\")\r\nprint(f\"{Style.strikethrough()}Strikethrough {Style.reset()}\")\r\n\r\nprint(f\"{Style.bold()}{Style.italic()}bold+italic {Style.reset()}\")\r\nprint(f\"{Style.minecraft('\u00a7','\u00a7ahello \u00a74world\u00a7r')}\")\r\n```\r\n\r\n<br>\r\n\r\n## .enable() and .disable():\r\n\r\nAfter executing the `Styling.disable()` command, the system will no longer apply coloring and styling to the content. To re-enable these features, simply use the `Styling.enable()` command.\r\n\r\n```python\r\nfrom chromaconsole import Styling\r\n#disable the coloring and styling\r\nStyling.disable()\r\nprint(f\"{Color.text(r, g, b)}text without color and style{Style.reset()}\")\r\nStyling.enable()\r\nprint(f\"{Color.text(r, g, b)}text with color and style{Style.reset()}\")\r\n```\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A small colorful module to change text colors in terminal",
"version": "0.8.6.2",
"project_urls": {
"Bug_Tracker": "https://github.com/umit-09/chromaconsole/issues",
"Homepage": "https://github.com/umit-09/chromaconsole"
},
"split_keywords": [
"color",
"console",
"terminal",
"text",
"style"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5db2d403de8e9ce88df01939c05cedb3be8a3fd41d92987640f7376aa1ee6c0b",
"md5": "2d8e916e22e6d0c2f70abb6d822ec25e",
"sha256": "295baa1fe21b9161e5cba1eb850028b5d8fa1abc0423737a64eebf177df6b4f4"
},
"downloads": -1,
"filename": "chromaconsole-0.8.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d8e916e22e6d0c2f70abb6d822ec25e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 10654,
"upload_time": "2024-02-28T12:12:53",
"upload_time_iso_8601": "2024-02-28T12:12:53.757277Z",
"url": "https://files.pythonhosted.org/packages/5d/b2/d403de8e9ce88df01939c05cedb3be8a3fd41d92987640f7376aa1ee6c0b/chromaconsole-0.8.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8f0732c3ed5af3794bda5c935984b0da694cb3d8ab21b3880ac8eb5357f03c07",
"md5": "a2682b3214f95bdbd0f6d18819907cb9",
"sha256": "627c1269f9f42aa69895b86b8e0988c0d467fd0a69959e6c565bcd04e0236abb"
},
"downloads": -1,
"filename": "chromaconsole-0.8.6.2.tar.gz",
"has_sig": false,
"md5_digest": "a2682b3214f95bdbd0f6d18819907cb9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 9268,
"upload_time": "2024-02-28T12:12:55",
"upload_time_iso_8601": "2024-02-28T12:12:55.671273Z",
"url": "https://files.pythonhosted.org/packages/8f/07/32c3ed5af3794bda5c935984b0da694cb3d8ab21b3880ac8eb5357f03c07/chromaconsole-0.8.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-28 12:12:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "umit-09",
"github_project": "chromaconsole",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "chromaconsole"
}