# Random Color library
[![CodeQL](https://github.com/ibehii/RandomColorlib/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/ibehii/RandomColorlib/actions/workflows/codeql.yml)
https://github.com/ibehii/RandomColorlib/assets/79264026/0daa3c30-3f45-4abc-8343-0d6ce11ee20b
**This Python library makes your terminal output colorful ✨**\
On this Python library, you can access 255 kinds of color randomly!
## YouTube Tutorial 📹
# installation
For installation, enter this command in your terminal:
> `pip install Rcolor==3.0.1`
## features
- [Change the foreground color](#changing-the-foreground-color)
- [Change the background color](#changing-the-background-color)
- [Change the font (style)](#changing-the-font-style)
- [change the foreground color for each character](#change-the-foreground-color-for-each-character)
- [Change foreground and background color at the same time](#multiple-capabilities)
- [Change foreground and font at the same time](#multiple-capabilities)
- [Change background and font at the same time](#multiple-capabilities)
- [Change foreground, background color and font at the same time](#multiple-capabilities)
---
# Usage
## importing
For importing the library You can use the following:
```python
# First way
import Rcolor
Rcolor.<Module Name>
# Easier way
from Rcolor import <Module Name>
# For importing all modules (Not recommended):
from Rcolor import *
```
------
## **Important tip**
Some terminals like cmd can't support all colors so it's better to use standard colors:
``` python
import Rcolor
print(Rcolor.standard_fg("Hello, World")) # random foreground color
print(Rcolor.standard_bg("Hello, World")) # random background color
print(Rcolor.standard_rainbow_fg("Hello world")) # to change foreground for each character using standard colors
```
- You can use the **Auto** part too, Which doesn't depend on the operating system and automatically detects the operating system
```python
import Rcolor
print(Rcolor.auto_fg("Hello, World")) # Automatic random foreground color
print(Rcolor.auto_bg("Hello, World")) # Automatic random background color
```
## Changing the foreground color
**Make Sure to check [Important tip](#important-tip)**
```python
import Rcolor
print(Rcolor.foreground('Hello, World!')) # to use 255 colors
print(Rcolor.standard_fg("Hello, World")) # to use standard color (15 colors).
```
----
## Changing the Background color
**Make Sure to check [Important tip](#important-tip)**
```python
import Rcolor
print(Rcolor.background('Hello, World')) # to use 255 colors
print(Rcolor.standard_bg('Hello, World')) # to use standard color (15 colors).
```
## Changing the font (style)
**Make Sure to check [Important tip](#important-tip)**
```python
import Rcolor
print(Rcolor.style('Hello, World!'))
```
---
## Change the foreground color for each character
**Make Sure to check [Important tip](#important-tip)**
```python
import Rcolor
print(Rcolor.rainbow_fg("Hello world"))
print(Rcolor.standard_rainbow_fg("Hello world"))
```
---
## Multiple capabilities
```python
import Rcolor
# Changes the foreground color and background color at the same time
Rcolor.foreground_background("Hello world")
# Changes the the foreground color and the font at the same time
Rcolor.foreground_style("Hello world")
# Changes the background color and font at the same time
Rcolor.background_style("Hello world")
# Changes foreground color, background color and font at the same time
Rcolor.foreground_background_style("Hello world")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ibehii/RandomColorlib",
"name": "Rcolor",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.6",
"maintainer_email": null,
"keywords": "Randomly change your output color",
"author": "Behnam",
"author_email": "Behii@tutanota.com",
"download_url": "https://files.pythonhosted.org/packages/d5/2b/d58ab537336bb7daaf1e796dd687df719570bbf7d29b1c2639f1c9c7ff54/rcolor-3.0.1.tar.gz",
"platform": null,
"description": "# Random Color library\n\n[![CodeQL](https://github.com/ibehii/RandomColorlib/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/ibehii/RandomColorlib/actions/workflows/codeql.yml)\n\nhttps://github.com/ibehii/RandomColorlib/assets/79264026/0daa3c30-3f45-4abc-8343-0d6ce11ee20b\n\n**This Python library makes your terminal output colorful \u2728**\\\nOn this Python library, you can access 255 kinds of color randomly!\n## YouTube Tutorial \ud83d\udcf9\n# installation \nFor installation, enter this command in your terminal:\n> `pip install Rcolor==3.0.1`\n## features\n\n- [Change the foreground color](#changing-the-foreground-color)\n- [Change the background color](#changing-the-background-color)\n- [Change the font (style)](#changing-the-font-style)\n- [change the foreground color for each character](#change-the-foreground-color-for-each-character)\n- [Change foreground and background color at the same time](#multiple-capabilities)\n- [Change foreground and font at the same time](#multiple-capabilities)\n- [Change background and font at the same time](#multiple-capabilities)\n- [Change foreground, background color and font at the same time](#multiple-capabilities)\n\n---\n# Usage\n## importing\nFor importing the library You can use the following:\n```python \n# First way \nimport Rcolor\nRcolor.<Module Name>\n\n# Easier way\nfrom Rcolor import <Module Name>\n\n# For importing all modules (Not recommended):\nfrom Rcolor import * \n```\n------\n\n## **Important tip**\nSome terminals like cmd can't support all colors so it's better to use standard colors:\n``` python \nimport Rcolor\n\nprint(Rcolor.standard_fg(\"Hello, World\")) # random foreground color\nprint(Rcolor.standard_bg(\"Hello, World\")) # random background color\nprint(Rcolor.standard_rainbow_fg(\"Hello world\")) # to change foreground for each character using standard colors\n``` \n- You can use the **Auto** part too, Which doesn't depend on the operating system and automatically detects the operating system\n\n```python\nimport Rcolor\n\nprint(Rcolor.auto_fg(\"Hello, World\")) # Automatic random foreground color\nprint(Rcolor.auto_bg(\"Hello, World\")) # Automatic random background color\n```\n\n## Changing the foreground color\n**Make Sure to check [Important tip](#important-tip)**\n```python\nimport Rcolor\n\nprint(Rcolor.foreground('Hello, World!')) # to use 255 colors\nprint(Rcolor.standard_fg(\"Hello, World\")) # to use standard color (15 colors).\n```\n----\n## Changing the Background color\n**Make Sure to check [Important tip](#important-tip)**\n\n```python\nimport Rcolor\n\nprint(Rcolor.background('Hello, World')) # to use 255 colors\nprint(Rcolor.standard_bg('Hello, World')) # to use standard color (15 colors).\n```\n## Changing the font (style)\n**Make Sure to check [Important tip](#important-tip)**\n\n```python\nimport Rcolor\nprint(Rcolor.style('Hello, World!'))\n```\n---\n## Change the foreground color for each character\n**Make Sure to check [Important tip](#important-tip)**\n```python\nimport Rcolor\nprint(Rcolor.rainbow_fg(\"Hello world\"))\nprint(Rcolor.standard_rainbow_fg(\"Hello world\"))\n```\n\n---\n## Multiple capabilities\n```python\nimport Rcolor\n\n# Changes the foreground color and background color at the same time\nRcolor.foreground_background(\"Hello world\")\n\n# Changes the the foreground color and the font at the same time\nRcolor.foreground_style(\"Hello world\")\n\n# Changes the background color and font at the same time\nRcolor.background_style(\"Hello world\")\n\n# Changes foreground color, background color and font at the same time\nRcolor.foreground_background_style(\"Hello world\") \n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library that makes your output colorful in Python",
"version": "3.0.1",
"project_urls": {
"Homepage": "https://github.com/ibehii/RandomColorlib"
},
"split_keywords": [
"randomly",
"change",
"your",
"output",
"color"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d09b0419c23f9ae69896fe816a10258673459cd32cdd217cc10952ec38ab34f6",
"md5": "abfff7634114a978809905a1c0a6fca6",
"sha256": "e2003e68354060936acf8502bbb4f4cbedfbb8c3090230b18efe09d1264871d2"
},
"downloads": -1,
"filename": "Rcolor-3.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "abfff7634114a978809905a1c0a6fca6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.6",
"size": 7511,
"upload_time": "2024-09-08T22:30:18",
"upload_time_iso_8601": "2024-09-08T22:30:18.506125Z",
"url": "https://files.pythonhosted.org/packages/d0/9b/0419c23f9ae69896fe816a10258673459cd32cdd217cc10952ec38ab34f6/Rcolor-3.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d52bd58ab537336bb7daaf1e796dd687df719570bbf7d29b1c2639f1c9c7ff54",
"md5": "6d64365d0d8c673e3f19a4f5202a8200",
"sha256": "8d1f28b602c5e978a2907007ae183d8e1163085787c3d42a8a03c0cf6a2bfccf"
},
"downloads": -1,
"filename": "rcolor-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "6d64365d0d8c673e3f19a4f5202a8200",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.6",
"size": 7832,
"upload_time": "2024-09-08T22:30:19",
"upload_time_iso_8601": "2024-09-08T22:30:19.855244Z",
"url": "https://files.pythonhosted.org/packages/d5/2b/d58ab537336bb7daaf1e796dd687df719570bbf7d29b1c2639f1c9c7ff54/rcolor-3.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-08 22:30:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ibehii",
"github_project": "RandomColorlib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rcolor"
}