
[](https://github.com/faissaloux/termspark/actions/workflows/tests.yml) [](https://codecov.io/gh/faissaloux/termspark) [](https://results.pre-commit.ci/latest/github/faissaloux/termspark/main)   
# Installation
```bash
pip install termspark
```
# Usage
- [`print()`](#print-but-more)
- [`input()`](#input)
- [`line()`](#line)
- [paint](#you-can-use-different-styles-on-same-position)
- [`raw()`](#raw)
- [force Width](#force-width)
- [max width](#set-content-max-width)
- [`full_width()`](#full-width)
- [separator](#separator)
- [`Termspark().line()`](#line-1)
- [RGB](#rgb)
- [HEX](#hex)
- [style](#style)
- [hyperlinks](#hyperlinks)
- [supported colors](#supported-colors)
### `print()`, but more!
Import Termspark's print and take advantage of all its features, [colors](#you-can-also-paint-your-content), [highlights](#you-can-also-paint-your-content), [styles](#style), [hyperlinks](#hyperlinks) and more ...
```python
from termspark import print
print(" Termspark ", "white", "blue", "italic")
print(" [@termspark](https://github.com/faissaloux/termspark) ", "black", "white", "italic, bold")
```

You can choose from `["left", "center", "right"]` to specify where to print by passing it as position parameter:
`print(" Termspark ", position="center")`.
You can enable the Full Width using full_width parameter:
`print(" Termspark ", highlight="blue", full_width=True)`.
You can fill the empty space by a character using `print(separator=)`.
```python
from termspark import print
print(" TERMSPARK ", "white", "green", position="center", separator="_")
```

### `input()`
input with colors, highlights, styles, and hyperlinks.
With `input(position=)` you can specify position where to put your input text `["left", "center", "right"]`.
With `input(full_width=)` you can enable full width `True | False`.
```python
from termspark import input
name = input(" What's your name? ", "white", "blue", "italic", "center", True)
```

#### Input Type
You can specify the input type by passing it to the `type=` parameter.
For a calculation example, to pass the input value into a calculation you don't need to convert it to `int` anymore, you just need to set it from `type` argument 🥳 .
```python
from termspark import input
birthyear = input(" Your year birth? ", "white", "blue", type=int)
print(f"Your age is: {2023 - birthyear}")
```
#### Input Callback
the `input()` supports callback too.
If you need to pass the input value into some function before returning the result, you need to pass it into the `callback=` argument.
```python
from termspark import input
def age_calc(birthyear, currentyear=2023):
return currentyear - birthyear
age = input(" Your year birth? ", "white", "blue", type=int, callback=age_calc)
print(f"Your age is: {age}")
```
You can use separator in `input(separator=)` too.
```python
from termspark import input
name = input(" What's your name?", "white", "blue", position="left", separator=".")
```

### `line()`
To print empty line use `line()`, you can leave it empty or fill it with a repeated character, you can specify its color too.
```python
from termspark import line
line(".", "blue")
line(highlight="green")
line()
line("-")
```

## More control
```python
from termspark import TermSpark
TermSpark().print_right('RIGHT').spark()
TermSpark().spark_right('RIGHT').spark()
TermSpark().print_left('LEFT').spark()
TermSpark().spark_left('LEFT').spark()
TermSpark().print_center('CENTER').spark()
TermSpark().spark_center('CENTER').spark()
TermSpark().line('.').spark()
TermSpark().print_left('LEFT').print_right('RIGHT').set_separator('.').spark()
TermSpark().print_left('LEFT').print_center('CENTER').print_right('RIGHT').set_separator('.').spark()
TermSpark().spark_left('LEFT').spark_center('CENTER').spark_right('RIGHT').set_separator('.').spark()
```
> [!NOTE]
> Separator can contain only one character.
### You can also paint your content
#### text color
```python
from termspark import TermSpark
TermSpark().print_right('RIGHT', 'blue').spark()
TermSpark().print_left('LEFT', 'light red').spark()
TermSpark().print_center('CENTER', 'light_green').spark()
```
#### background color
```python
from termspark import TermSpark
TermSpark().print_right('RIGHT', None, 'light_magenta').spark()
TermSpark().print_left('LEFT', 'red', 'white').spark()
TermSpark().print_center('CENTER', 'white', 'light blue').spark()
```
### You can use different styles on same position
```python
from termspark import TermSpark
TermSpark().spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue']).spark()
TermSpark().spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow']).spark()
TermSpark().spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red']).spark()
```
`You know you can use them all together 😉`
### Lines are too long to write a termspark line! 😑
```python
from termspark import TermSpark
TermSpark().spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue']).spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow']).spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red']).spark()
```
#### You can separate them by calling each function in a line 🤤
```python
from termspark import TermSpark
termspark = TermSpark()
termspark.spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue'])
termspark.spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow'])
termspark.spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red'])
termspark.spark()
```
#### Still too long 🙄 Got you 🤩
```python
from termspark import TermSpark
termspark = TermSpark()
termspark.spark_left([' * ', 'gray', 'white'])
termspark.spark_left(' Info ', 'white', 'blue')
termspark.spark_center([' * ', 'gray', 'white'])
termspark.spark_center([' Warning ', 'white', 'yellow'])
termspark.spark_right(' * ', 'gray', 'white')
termspark.spark_right([' Error ', 'white', 'red'])
termspark.spark()
```
### Raw
You can print raw version which is colors-code-free so you can print clean text into files for example.
```python
from termspark import TermSpark
raw = TermSpark().print_left('LEFT').print_right('RIGHT').set_separator('.').raw()
```
### Force Width
You can customize width instead of the default full terminal width.
```python
from termspark import TermSpark
TermSpark().set_width(40).print_left("LEFT", "red").print_right("RIGHT", "blue").spark()
```
### Set content max width
You can specify max width of content depending on position using `max_[position](max_characters)`.
```python
from termspark import TermSpark
termspark = TermSpark()
termspark.spark_left(["LEFT", "red"])
termspark.spark_right(["RIGHT", "blue"])
termspark.max_left(2)
termspark.max_right(3)
termspark.spark()
```
This should show only "LE" on the left, and "RIG" on the right.
> [!WARNING]
> `max_[position]()` is only supported by sparkers.
### Full width
You can enable full width by using `full_width()`.
```python
from termspark import TermSpark
termspark = TermSpark()
termspark.spark_center(['Thanks for using Termspark!', 'white', 'green'])
termspark.full_width()
termspark.spark()
```
> [!WARNING]
> `full_width()` can only be used with one position.
### Separator
You can add color and highlight to separator too using `set_separator(content, color, highlight)`.
```python
termspark = TermSpark()
termspark.spark_left([' Author ', 'green'])
termspark.spark_right([' Faissal Wahabali ', 'green'])
termspark.set_separator('.', 'green')
termspark.spark()
```

### Line
You can add highlight a line by using `line(highlight=highlight)`.
```python
termspark = TermSpark()
termspark.line(highlight='green')
termspark.spark()
```

### RGB
```python
from termspark import print, line
# String RGB
print(" RGB! ", color="255,255,255", highlight="36,114,200")
line(highlight="36,114,200")
# Tuple RGB
print(" Tuple RGB! ", color=(255, 255, 255), highlight=(36, 114, 200))
line(highlight=(36,114,200))
```
### HEX
```python
from termspark import print, line
print(" HEX! ", color="#FFF", highlight="#2472C8")
line(highlight="#2472C8")
```
### Style
You can style your text by passing it to `print() style parameter` or to `spark([]) fourth list element`.
**Supported styles:**
- bold
- dim
- italic
- overline
- underline
- curly underline
- dotted underline
- dashed underline
- double underline
- strike through
- blink
- reverse
- hidden
> [!NOTE]
> You can mix styles by separating them by commas.
```python
termspark = TermSpark()
termspark.print_center(' Termspark ', 'green', style='underline, overline, italic')
termspark.full_width()
termspark.spark()
```

### Hyperlinks
You can insert hyperlink using Markdown `[TEXT](LINK)`.
```python
termspark = TermSpark()
termspark.spark_left([" Author ", "green"])
termspark.spark_right([" [@faissaloux](https://github.com/faissaloux) ", "green"])
termspark.set_separator(".", "green")
termspark.spark()
```

### Supported colors
| Color | Name | HEX |
| ----------------------------------------------------------- | ------------------- | ------- |
|  | black | #000000 |
|  | maroon | #800000 |
|  | green | #008000 |
|  | olive | #808000 |
|  | navy | #000080 |
|  | purple | #800080 |
|  | teal | #008080 |
|  | silver | #C0C0C0 |
|  | gray | #808080 |
|  | grey | #808080 |
|  | red | #FF0000 |
|  | lime | #00FF00 |
|  | yellow | #FFFF00 |
|  | blue | #0000FF |
|  | fuchsia | #FF00FF |
|  | aqua | #00FFFF |
|  | white | #FFFFFF |
|  | navy blue | #00005F |
|  | dark blue | #000087 |
|  | dark blue 2 | #0000AF |
|  | dark blue 1 | #0000D7 |
|  | dark green | #005F00 |
|  | blue stone | #005F5F |
|  | orient | #005F87 |
|  | endeavour | #005FAF |
|  | science blue | #005FD7 |
|  | blue ribbon | #005FFF |
|  | japanese laurel | #008700 |
|  | deep sea | #00875F |
|  | turquoise | #008787 |
|  | deep cerulean | #0087AF |
|  | lochmara | #0087D7 |
|  | azure radiance | #0087FF |
|  | islamic green | #00AF00 |
|  | spring green | #00AF5F |
|  | dark cyan | #00AF87 |
|  | light sea green | #00AFAF |
|  | cerulean | #00AFD7 |
|  | blue bolt | #00AFFF |
|  | electric green | #00D700 |
|  | malachite | #00D75F |
|  | caribbean green | #00D787 |
|  | cyan 1 | #00D7AF |
|  | dark turquoise | #00D7D7 |
|  | vivid sky blue | #00D7FF |
|  | electric green 1 | #00FF00 |
|  | guppie green | #00FF5F |
|  | spring green 1 | #00FF87 |
|  | medium spring green | #00FFAF |
|  | sea green | #00FFD7 |
|  | cyan | #00FFFF |
|  | rosewood | #5F0000 |
|  | pompadour | #5F005F |
|  | pigment indigo | #5F0087 |
|  | purple 3 | #5F00AF |
|  | electic violet | #5F00D7 |
|  | blue violet | #5F00FF |
|  | verdun green | #5F5F00 |
|  | scorpion | #5F5F5F |
|  | comet | #5F5F87 |
|  | scampi | #5F5FAF |
|  | indigo | #5F5FD7 |
|  | cornflower blue 1 | #5F5FFF |
|  | limeade | #5F8700 |
|  | glade green | #5F875F |
|  | juniper | #5F8787 |
|  | hippie blue | #5F87AF |
|  | havelock blue | #5F87D7 |
|  | cornflower blue | #5F87FF |
|  | limea | #5FAF00 |
|  | fern | #5FAF5F |
|  | silver tree | #5FAF87 |
|  | tradewind | #5FAFAF |
|  | shakespeare | #5FAFD7 |
|  | malibu | #5FAFFF |
|  | bright green | #5FD700 |
|  | pale green | #5FD75F |
|  | pastel green | #5FD787 |
|  | downy | #5FD7AF |
|  | viking | #5FD7D7 |
|  | steel blue | #5FD7FF |
|  | chartreuse | #5FFF00 |
|  | screaming green | #5FFF5F |
|  | sea green 1 | #5FFF87 |
|  | aquamarine 1 | #5FFFAF |
|  | aquamarine 2 | #5FFFD7 |
|  | aquamarine | #5FFFFF |
|  | dark red | #870000 |
|  | fresh eggplant | #87005F |
|  | dark magenta | #870087 |
|  | purple 2 | #8700AF |
|  | electric violet | #8700D7 |
|  | purple 1 | #8700FF |
|  | brown | #875F00 |
|  | copper rose | #875F5F |
|  | strike master | #875F87 |
|  | deluge | #875FAF |
|  | medium purple | #875FD7 |
|  | heliotrope | #875FFF |
|  | olive 1 | #878700 |
|  | clay creek | #87875F |
|  | gray 1 | #878787 |
|  | grey 1 | #878787 |
|  | wild blue yonder | #8787AF |
|  | chetwode blue | #8787D7 |
|  | light slate blue | #8787FF |
|  | limeade 1 | #87AF00 |
|  | chelsea cucumber | #87AF5F |
|  | bay leaf | #87AF87 |
|  | gulf stream | #87AFAF |
|  | polo blue | #87AFD7 |
|  | malibu 1 | #87AFFF |
|  | pistachio | #87D700 |
|  | dark olive green | #87D75F |
|  | feijoa | #87D787 |
|  | vista blue | #87D7AF |
|  | bermuda | #87D7D7 |
|  | anakiwa | #87D7FF |
|  | chartreuse 1 | #87FF00 |
|  | light green | #87FF5F |
|  | mint green | #87FF87 |
|  | pale green 1 | #87FFAF |
|  | aqua marine | #87FFD7 |
|  | anakiwa 1 | #87FFFF |
|  | bright red | #AF0000 |
|  | flirt | #AF005F |
|  | medium violet red | #AF0087 |
|  | magenta 1 | #AF00AF |
|  | dark violet | #AF00D7 |
|  | purple 4 | #AF00FF |
|  | rose of sharon | #AF5F00 |
|  | indian red | #AF5F5F |
|  | tapestry | #AF5F87 |
|  | fuchsia pink | #AF5FAF |
|  | medium purple 1 | #AF5FD7 |
|  | heliotrope 1 | #AF5FFF |
|  | pirate gold | #AF8700 |
|  | muesli | #AF875F |
|  | pharlap | #AF8787 |
|  | bouquet | #AF87AF |
|  | lavender | #AF87D7 |
|  | heliotrope 2 | #AF87FF |
|  | gold 1 | #AFAF00 |
|  | olive green | #AFAF5F |
|  | hillary | #AFAF87 |
|  | silver chalice | #AFAFAF |
|  | wistful | #AFAFD7 |
|  | melrose | #AFAFFF |
|  | rio grande | #AFD700 |
|  | conifer | #AFD75F |
|  | feijoa 1 | #AFD787 |
|  | pixie green | #AFD7AF |
|  | jungle mist | #AFD7D7 |
|  | anakiwa 2 | #AFD7FF |
|  | lime 1 | #AFFF00 |
|  | green yellow | #AFFF5F |
|  | mint green 1 | #AFFF87 |
|  | dark sea green | #AFFFAF |
|  | aero blue | #AFFFD7 |
|  | french pass | #AFFFFF |
|  | guardsman red | #D70000 |
|  | razzmatazz | #D7005F |
|  | hollywood cerise | #D70087 |
|  | hollywood cerise 1 | #D700AF |
|  | purple pizzazz | #D700D7 |
|  | electric violet 1 | #D700FF |
|  | tenn | #D75F00 |
|  | roman | #D75F5F |
|  | cranberry | #D75F87 |
|  | hopbush | #D75FAF |
|  | orchid | #D75FD7 |
|  | medium orchid | #D75FFF |
|  | mango tango | #D78700 |
|  | copperfield | #D7875F |
|  | pink | #D78787 |
|  | cancan | #D787AF |
|  | light orchid | #D787D7 |
|  | heliotrope 3 | #D787FF |
|  | corn | #D7AF00 |
|  | tacha | #D7AF5F |
|  | tan | #D7AF87 |
|  | clam shell | #D7AFAF |
|  | thistle | #D7AFD7 |
|  | mauve | #D7AFFF |
|  | corn 1 | #D7D700 |
|  | khaki | #D7D75F |
|  | deco | #D7D787 |
|  | green mist | #D7D7AF |
|  | alto | #D7D7D7 |
|  | fog | #D7D7FF |
|  | chartreuse yellow | #D7FF00 |
|  | canary | #D7FF5F |
|  | honeysuckle | #D7FF87 |
|  | reef | #D7FFAF |
|  | snowy mint | #D7FFD7 |
|  | oyster bay | #D7FFFF |
|  | rose | #FF005F |
|  | deep pink | #FF0087 |
|  | hollywood cerise 2 | #FF00AF |
|  | purple pizzazz 1 | #FF00D7 |
|  | magenta | #FF00FF |
|  | blaze orange | #FF5F00 |
|  | bitter sweet | #FF5F5F |
|  | wild watermelon | #FF5F87 |
|  | hotpink | #FF5FAF |
|  | hotpink 1 | #FF5FD7 |
|  | pink flamingo | #FF5FFF |
|  | flush orange | #FF8700 |
|  | salmon | #FF875F |
|  | vivid tangerine | #FF8787 |
|  | pink salmon | #FF87AF |
|  | lavender rose | #FF87D7 |
|  | blush pink | #FF87FF |
|  | yellow sea | #FFAF00 |
|  | texas rose | #FFAF5F |
|  | hit pink | #FFAF87 |
|  | sundown | #FFAFAF |
|  | cotton candy | #FFAFD7 |
|  | lavender rose 1 | #FFAFFF |
|  | gold | #FFD700 |
|  | dandelion | #FFD75F |
|  | grandis | #FFD787 |
|  | caramel | #FFD7AF |
|  | cosmos | #FFD7D7 |
|  | pink lace | #FFD7FF |
|  | laser lemon | #FFFF5F |
|  | dolly | #FFFF87 |
|  | portafino | #FFFFAF |
|  | cumulus | #FFFFD7 |
|  | cod gray | #080808 |
|  | cod gray 1 | #121212 |
|  | cod gray 2 | #1C1C1C |
|  | mine shaft | #262626 |
|  | mine shaft 1 | #303030 |
|  | mine shaft 2 | #3A3A3A |
|  | tundora | #444444 |
|  | tundora 1 | #4E4E4E |
|  | scorpion 1 | #585858 |
|  | dove gray | #626262 |
|  | dove gray 1 | #6C6C6C |
|  | boulder | #767676 |
|  | gray 2 | #8A8A8A |
|  | grey 2 | #8A8A8A |
|  | dusty gray | #949494 |
|  | silver chalice 1 | #9E9E9E |
|  | silver chalice 2 | #A8A8A8 |
|  | silver chalice 3 | #B2B2B2 |
|  | silver 1 | #BCBCBC |
|  | silver 2 | #C6C6C6 |
|  | alto 1 | #D0D0D0 |
|  | alto 2 | #DADADA |
|  | mercury | #E4E4E4 |
|  | gallery | #EEEEEE |
Raw data
{
"_id": null,
"home_page": "https://github.com/faissaloux/termspark",
"name": "termspark",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": null,
"keywords": "terminal, cmd, design, colorful",
"author": "Faissal Wahabali",
"author_email": "contact@faissaloux.com",
"download_url": null,
"platform": null,
"description": "\n\n[](https://github.com/faissaloux/termspark/actions/workflows/tests.yml) [](https://codecov.io/gh/faissaloux/termspark) [](https://results.pre-commit.ci/latest/github/faissaloux/termspark/main)   \n\n# Installation\n```bash\n pip install termspark\n```\n\n# Usage\n\n- [`print()`](#print-but-more)\n- [`input()`](#input)\n- [`line()`](#line)\n- [paint](#you-can-use-different-styles-on-same-position)\n- [`raw()`](#raw)\n- [force Width](#force-width)\n- [max width](#set-content-max-width)\n- [`full_width()`](#full-width)\n- [separator](#separator)\n- [`Termspark().line()`](#line-1)\n- [RGB](#rgb)\n- [HEX](#hex)\n- [style](#style)\n- [hyperlinks](#hyperlinks)\n- [supported colors](#supported-colors)\n\n### `print()`, but more!\nImport Termspark's print and take advantage of all its features, [colors](#you-can-also-paint-your-content), [highlights](#you-can-also-paint-your-content), [styles](#style), [hyperlinks](#hyperlinks) and more ...\n\n```python\nfrom termspark import print\n\nprint(\" Termspark \", \"white\", \"blue\", \"italic\")\nprint(\" [@termspark](https://github.com/faissaloux/termspark) \", \"black\", \"white\", \"italic, bold\")\n```\n\n\nYou can choose from `[\"left\", \"center\", \"right\"]` to specify where to print by passing it as position parameter:\n`print(\" Termspark \", position=\"center\")`.\n\nYou can enable the Full Width using full_width parameter:\n`print(\" Termspark \", highlight=\"blue\", full_width=True)`.\n\nYou can fill the empty space by a character using `print(separator=)`.\n\n```python\nfrom termspark import print\n\nprint(\" TERMSPARK \", \"white\", \"green\", position=\"center\", separator=\"_\")\n```\n\n\n### `input()`\n\ninput with colors, highlights, styles, and hyperlinks.\n\nWith `input(position=)` you can specify position where to put your input text `[\"left\", \"center\", \"right\"]`.\nWith `input(full_width=)` you can enable full width `True | False`.\n\n```python\nfrom termspark import input\n\nname = input(\" What's your name? \", \"white\", \"blue\", \"italic\", \"center\", True)\n```\n\n\n\n#### Input Type\nYou can specify the input type by passing it to the `type=` parameter.\n\nFor a calculation example, to pass the input value into a calculation you don't need to convert it to `int` anymore, you just need to set it from `type` argument \ud83e\udd73 .\n```python\nfrom termspark import input\n\nbirthyear = input(\" Your year birth? \", \"white\", \"blue\", type=int)\nprint(f\"Your age is: {2023 - birthyear}\")\n```\n\n#### Input Callback\nthe `input()` supports callback too.\n\nIf you need to pass the input value into some function before returning the result, you need to pass it into the `callback=` argument.\n\n```python\nfrom termspark import input\n\ndef age_calc(birthyear, currentyear=2023):\n return currentyear - birthyear\n\nage = input(\" Your year birth? \", \"white\", \"blue\", type=int, callback=age_calc)\nprint(f\"Your age is: {age}\")\n```\n\nYou can use separator in `input(separator=)` too.\n\n```python\nfrom termspark import input\n\nname = input(\" What's your name?\", \"white\", \"blue\", position=\"left\", separator=\".\")\n```\n\n\n### `line()`\nTo print empty line use `line()`, you can leave it empty or fill it with a repeated character, you can specify its color too.\n\n```python\nfrom termspark import line\n\nline(\".\", \"blue\")\nline(highlight=\"green\")\nline()\nline(\"-\")\n```\n\n\n## More control\n```python\n from termspark import TermSpark\n\n TermSpark().print_right('RIGHT').spark()\n TermSpark().spark_right('RIGHT').spark()\n TermSpark().print_left('LEFT').spark()\n TermSpark().spark_left('LEFT').spark()\n TermSpark().print_center('CENTER').spark()\n TermSpark().spark_center('CENTER').spark()\n TermSpark().line('.').spark()\n\n TermSpark().print_left('LEFT').print_right('RIGHT').set_separator('.').spark()\n TermSpark().print_left('LEFT').print_center('CENTER').print_right('RIGHT').set_separator('.').spark()\n TermSpark().spark_left('LEFT').spark_center('CENTER').spark_right('RIGHT').set_separator('.').spark()\n```\n\n> [!NOTE]\n> Separator can contain only one character.\n\n### You can also paint your content\n#### text color\n\n```python\n from termspark import TermSpark\n\n TermSpark().print_right('RIGHT', 'blue').spark()\n TermSpark().print_left('LEFT', 'light red').spark()\n TermSpark().print_center('CENTER', 'light_green').spark()\n```\n\n#### background color\n\n```python\n from termspark import TermSpark\n\n TermSpark().print_right('RIGHT', None, 'light_magenta').spark()\n TermSpark().print_left('LEFT', 'red', 'white').spark()\n TermSpark().print_center('CENTER', 'white', 'light blue').spark()\n```\n\n### You can use different styles on same position\n```python\n from termspark import TermSpark\n\n TermSpark().spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue']).spark()\n TermSpark().spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow']).spark()\n TermSpark().spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red']).spark()\n```\n`You know you can use them all together \ud83d\ude09`\n\n### Lines are too long to write a termspark line! \ud83d\ude11\n```python\n from termspark import TermSpark\n\n TermSpark().spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue']).spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow']).spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red']).spark()\n```\n#### You can separate them by calling each function in a line \ud83e\udd24\n```python\n from termspark import TermSpark\n\n termspark = TermSpark()\n termspark.spark_left([' * ', 'gray', 'white'], [' Info ', 'white', 'blue'])\n termspark.spark_center([' * ', 'gray', 'white'], [' Warning ', 'white', 'yellow'])\n termspark.spark_right([' * ', 'gray', 'white'], [' Error ', 'white', 'red'])\n termspark.spark()\n```\n#### Still too long \ud83d\ude44 Got you \ud83e\udd29\n```python\n from termspark import TermSpark\n\n termspark = TermSpark()\n termspark.spark_left([' * ', 'gray', 'white'])\n termspark.spark_left(' Info ', 'white', 'blue')\n termspark.spark_center([' * ', 'gray', 'white'])\n termspark.spark_center([' Warning ', 'white', 'yellow'])\n termspark.spark_right(' * ', 'gray', 'white')\n termspark.spark_right([' Error ', 'white', 'red'])\n termspark.spark()\n```\n\n### Raw\nYou can print raw version which is colors-code-free so you can print clean text into files for example.\n\n```python\n from termspark import TermSpark\n\n raw = TermSpark().print_left('LEFT').print_right('RIGHT').set_separator('.').raw()\n```\n\n### Force Width\nYou can customize width instead of the default full terminal width.\n\n```python\n from termspark import TermSpark\n\n TermSpark().set_width(40).print_left(\"LEFT\", \"red\").print_right(\"RIGHT\", \"blue\").spark()\n```\n\n### Set content max width\nYou can specify max width of content depending on position using `max_[position](max_characters)`.\n```python\n from termspark import TermSpark\n\n termspark = TermSpark()\n termspark.spark_left([\"LEFT\", \"red\"])\n termspark.spark_right([\"RIGHT\", \"blue\"])\n termspark.max_left(2)\n termspark.max_right(3)\n termspark.spark()\n```\nThis should show only \"LE\" on the left, and \"RIG\" on the right.\n> [!WARNING]\n> `max_[position]()` is only supported by sparkers.\n\n### Full width\nYou can enable full width by using `full_width()`.\n\n```python\n from termspark import TermSpark\n\n termspark = TermSpark()\n termspark.spark_center(['Thanks for using Termspark!', 'white', 'green'])\n termspark.full_width()\n termspark.spark()\n```\n> [!WARNING]\n> `full_width()` can only be used with one position.\n\n### Separator\nYou can add color and highlight to separator too using `set_separator(content, color, highlight)`.\n```python\ntermspark = TermSpark()\ntermspark.spark_left([' Author ', 'green'])\ntermspark.spark_right([' Faissal Wahabali ', 'green'])\ntermspark.set_separator('.', 'green')\ntermspark.spark()\n```\n\n\n### Line\nYou can add highlight a line by using `line(highlight=highlight)`.\n```python\ntermspark = TermSpark()\ntermspark.line(highlight='green')\ntermspark.spark()\n```\n\n\n### RGB\n```python\nfrom termspark import print, line\n\n# String RGB\nprint(\" RGB! \", color=\"255,255,255\", highlight=\"36,114,200\")\nline(highlight=\"36,114,200\")\n\n# Tuple RGB\nprint(\" Tuple RGB! \", color=(255, 255, 255), highlight=(36, 114, 200))\nline(highlight=(36,114,200))\n```\n\n### HEX\n```python\nfrom termspark import print, line\n\nprint(\" HEX! \", color=\"#FFF\", highlight=\"#2472C8\")\nline(highlight=\"#2472C8\")\n```\n\n### Style\nYou can style your text by passing it to `print() style parameter` or to `spark([]) fourth list element`.\n\n**Supported styles:**\n- bold\n- dim\n- italic\n- overline\n- underline\n- curly underline\n- dotted underline\n- dashed underline\n- double underline\n- strike through\n- blink\n- reverse\n- hidden\n\n> [!NOTE]\n> You can mix styles by separating them by commas.\n\n```python\ntermspark = TermSpark()\ntermspark.print_center(' Termspark ', 'green', style='underline, overline, italic')\ntermspark.full_width()\ntermspark.spark()\n```\n\n\n### Hyperlinks\nYou can insert hyperlink using Markdown `[TEXT](LINK)`.\n```python\ntermspark = TermSpark()\ntermspark.spark_left([\" Author \", \"green\"])\ntermspark.spark_right([\" [@faissaloux](https://github.com/faissaloux) \", \"green\"])\ntermspark.set_separator(\".\", \"green\")\ntermspark.spark()\n```\n\n\n### Supported colors\n\n| Color\t | Name | HEX |\n| ----------------------------------------------------------- | ------------------- | ------- |\n|  | black | #000000 |\n|  | maroon | #800000 |\n|  | green | #008000 |\n|  | olive | #808000 |\n|  | navy | #000080 |\n|  | purple | #800080 |\n|  | teal | #008080 |\n|  | silver | #C0C0C0 |\n|  | gray | #808080 |\n|  | grey | #808080 |\n|  | red | #FF0000 |\n|  | lime | #00FF00 |\n|  | yellow | #FFFF00 |\n|  | blue | #0000FF |\n|  | fuchsia | #FF00FF |\n|  | aqua | #00FFFF |\n|  | white | #FFFFFF |\n|  | navy blue | #00005F |\n|  | dark blue | #000087 |\n|  | dark blue 2 | #0000AF |\n|  | dark blue 1 | #0000D7 |\n|  | dark green | #005F00 |\n|  | blue stone | #005F5F |\n|  | orient | #005F87 |\n|  | endeavour | #005FAF |\n|  | science blue | #005FD7 |\n|  | blue ribbon | #005FFF |\n|  | japanese laurel | #008700 |\n|  | deep sea | #00875F |\n|  | turquoise | #008787 |\n|  | deep cerulean | #0087AF |\n|  | lochmara | #0087D7 |\n|  | azure radiance | #0087FF |\n|  | islamic green | #00AF00 |\n|  | spring green | #00AF5F |\n|  | dark cyan | #00AF87 |\n|  | light sea green | #00AFAF |\n|  | cerulean | #00AFD7 |\n|  | blue bolt | #00AFFF |\n|  | electric green | #00D700 |\n|  | malachite | #00D75F |\n|  | caribbean green | #00D787 |\n|  | cyan 1 | #00D7AF |\n|  | dark turquoise | #00D7D7 |\n|  | vivid sky blue | #00D7FF |\n|  | electric green 1 | #00FF00 |\n|  | guppie green | #00FF5F |\n|  | spring green 1 | #00FF87 |\n|  | medium spring green | #00FFAF |\n|  | sea green | #00FFD7 |\n|  | cyan | #00FFFF |\n|  | rosewood | #5F0000 |\n|  | pompadour | #5F005F |\n|  | pigment indigo | #5F0087 |\n|  | purple 3 | #5F00AF |\n|  | electic violet | #5F00D7 |\n|  | blue violet | #5F00FF |\n|  | verdun green | #5F5F00 |\n|  | scorpion | #5F5F5F |\n|  | comet | #5F5F87 |\n|  | scampi | #5F5FAF |\n|  | indigo | #5F5FD7 |\n|  | cornflower blue 1 | #5F5FFF |\n|  | limeade | #5F8700 |\n|  | glade green | #5F875F |\n|  | juniper | #5F8787 |\n|  | hippie blue | #5F87AF |\n|  | havelock blue | #5F87D7 |\n|  | cornflower blue | #5F87FF |\n|  | limea | #5FAF00 |\n|  | fern | #5FAF5F |\n|  | silver tree | #5FAF87 |\n|  | tradewind | #5FAFAF |\n|  | shakespeare | #5FAFD7 |\n|  | malibu | #5FAFFF |\n|  | bright green | #5FD700 |\n|  | pale green | #5FD75F |\n|  | pastel green | #5FD787 |\n|  | downy | #5FD7AF |\n|  | viking | #5FD7D7 |\n|  | steel blue | #5FD7FF |\n|  | chartreuse | #5FFF00 |\n|  | screaming green | #5FFF5F |\n|  | sea green 1 | #5FFF87 |\n|  | aquamarine 1 | #5FFFAF |\n|  | aquamarine 2 | #5FFFD7 |\n|  | aquamarine | #5FFFFF |\n|  | dark red | #870000 |\n|  | fresh eggplant | #87005F |\n|  | dark magenta | #870087 |\n|  | purple 2 | #8700AF |\n|  | electric violet | #8700D7 |\n|  | purple 1 | #8700FF |\n|  | brown | #875F00 |\n|  | copper rose | #875F5F |\n|  | strike master | #875F87 |\n|  | deluge | #875FAF |\n|  | medium purple | #875FD7 |\n|  | heliotrope | #875FFF |\n|  | olive 1 | #878700 |\n|  | clay creek | #87875F |\n|  | gray 1 | #878787 |\n|  | grey 1 | #878787 |\n|  | wild blue yonder | #8787AF |\n|  | chetwode blue | #8787D7 |\n|  | light slate blue | #8787FF |\n|  | limeade 1 | #87AF00 |\n|  | chelsea cucumber | #87AF5F |\n|  | bay leaf | #87AF87 |\n|  | gulf stream | #87AFAF |\n|  | polo blue | #87AFD7 |\n|  | malibu 1 | #87AFFF |\n|  | pistachio | #87D700 |\n|  | dark olive green | #87D75F |\n|  | feijoa | #87D787 |\n|  | vista blue | #87D7AF |\n|  | bermuda | #87D7D7 |\n|  | anakiwa | #87D7FF |\n|  | chartreuse 1 | #87FF00 |\n|  | light green | #87FF5F |\n|  | mint green | #87FF87 |\n|  | pale green 1 | #87FFAF |\n|  | aqua marine | #87FFD7 |\n|  | anakiwa 1 | #87FFFF |\n|  | bright red | #AF0000 |\n|  | flirt | #AF005F |\n|  | medium violet red | #AF0087 |\n|  | magenta 1 | #AF00AF |\n|  | dark violet | #AF00D7 |\n|  | purple 4 | #AF00FF |\n|  | rose of sharon | #AF5F00 |\n|  | indian red | #AF5F5F |\n|  | tapestry | #AF5F87 |\n|  | fuchsia pink | #AF5FAF |\n|  | medium purple 1 | #AF5FD7 |\n|  | heliotrope 1 | #AF5FFF |\n|  | pirate gold | #AF8700 |\n|  | muesli | #AF875F |\n|  | pharlap | #AF8787 |\n|  | bouquet | #AF87AF |\n|  | lavender | #AF87D7 |\n|  | heliotrope 2 | #AF87FF |\n|  | gold 1 | #AFAF00 |\n|  | olive green | #AFAF5F |\n|  | hillary | #AFAF87 |\n|  | silver chalice | #AFAFAF |\n|  | wistful | #AFAFD7 |\n|  | melrose | #AFAFFF |\n|  | rio grande | #AFD700 |\n|  | conifer | #AFD75F |\n|  | feijoa 1 | #AFD787 |\n|  | pixie green | #AFD7AF |\n|  | jungle mist | #AFD7D7 |\n|  | anakiwa 2 | #AFD7FF |\n|  | lime 1 | #AFFF00 |\n|  | green yellow | #AFFF5F |\n|  | mint green 1 | #AFFF87 |\n|  | dark sea green | #AFFFAF |\n|  | aero blue | #AFFFD7 |\n|  | french pass | #AFFFFF |\n|  | guardsman red | #D70000 |\n|  | razzmatazz | #D7005F |\n|  | hollywood cerise | #D70087 |\n|  | hollywood cerise 1 | #D700AF |\n|  | purple pizzazz | #D700D7 |\n|  | electric violet 1 | #D700FF |\n|  | tenn | #D75F00 |\n|  | roman | #D75F5F |\n|  | cranberry | #D75F87 |\n|  | hopbush | #D75FAF |\n|  | orchid | #D75FD7 |\n|  | medium orchid | #D75FFF |\n|  | mango tango | #D78700 |\n|  | copperfield | #D7875F |\n|  | pink | #D78787 |\n|  | cancan | #D787AF |\n|  | light orchid | #D787D7 |\n|  | heliotrope 3 | #D787FF |\n|  | corn | #D7AF00 |\n|  | tacha | #D7AF5F |\n|  | tan | #D7AF87 |\n|  | clam shell | #D7AFAF |\n|  | thistle | #D7AFD7 |\n|  | mauve | #D7AFFF |\n|  | corn 1 | #D7D700 |\n|  | khaki | #D7D75F |\n|  | deco | #D7D787 |\n|  | green mist | #D7D7AF |\n|  | alto | #D7D7D7 |\n|  | fog | #D7D7FF |\n|  | chartreuse yellow | #D7FF00 |\n|  | canary | #D7FF5F |\n|  | honeysuckle | #D7FF87 |\n|  | reef | #D7FFAF |\n|  | snowy mint | #D7FFD7 |\n|  | oyster bay | #D7FFFF |\n|  | rose | #FF005F |\n|  | deep pink | #FF0087 |\n|  | hollywood cerise 2 | #FF00AF |\n|  | purple pizzazz 1 | #FF00D7 |\n|  | magenta | #FF00FF |\n|  | blaze orange | #FF5F00 |\n|  | bitter sweet | #FF5F5F |\n|  | wild watermelon | #FF5F87 |\n|  | hotpink | #FF5FAF |\n|  | hotpink 1 | #FF5FD7 |\n|  | pink flamingo | #FF5FFF |\n|  | flush orange | #FF8700 |\n|  | salmon | #FF875F |\n|  | vivid tangerine | #FF8787 |\n|  | pink salmon | #FF87AF |\n|  | lavender rose | #FF87D7 |\n|  | blush pink | #FF87FF |\n|  | yellow sea | #FFAF00 |\n|  | texas rose | #FFAF5F |\n|  | hit pink | #FFAF87 |\n|  | sundown | #FFAFAF |\n|  | cotton candy | #FFAFD7 |\n|  | lavender rose 1 | #FFAFFF |\n|  | gold | #FFD700 |\n|  | dandelion | #FFD75F |\n|  | grandis | #FFD787 |\n|  | caramel | #FFD7AF |\n|  | cosmos | #FFD7D7 |\n|  | pink lace | #FFD7FF |\n|  | laser lemon | #FFFF5F |\n|  | dolly | #FFFF87 |\n|  | portafino | #FFFFAF |\n|  | cumulus | #FFFFD7 |\n|  | cod gray | #080808 |\n|  | cod gray 1 | #121212 |\n|  | cod gray 2 | #1C1C1C |\n|  | mine shaft | #262626 |\n|  | mine shaft 1 | #303030 |\n|  | mine shaft 2 | #3A3A3A |\n|  | tundora | #444444 |\n|  | tundora 1 | #4E4E4E |\n|  | scorpion 1 | #585858 |\n|  | dove gray | #626262 |\n|  | dove gray 1 | #6C6C6C |\n|  | boulder | #767676 |\n|  | gray 2 | #8A8A8A |\n|  | grey 2 | #8A8A8A |\n|  | dusty gray | #949494 |\n|  | silver chalice 1 | #9E9E9E |\n|  | silver chalice 2 | #A8A8A8 |\n|  | silver chalice 3 | #B2B2B2 |\n|  | silver 1 | #BCBCBC |\n|  | silver 2 | #C6C6C6 |\n|  | alto 1 | #D0D0D0 |\n|  | alto 2 | #DADADA |\n|  | mercury | #E4E4E4 |\n|  | gallery | #EEEEEE |\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Takes control of terminal",
"version": "2.2.1",
"project_urls": {
"Homepage": "https://github.com/faissaloux/termspark"
},
"split_keywords": [
"terminal",
" cmd",
" design",
" colorful"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "55aca216f96c330578abf92078f524adc04b8cba638c9b213e13b17f1f583880",
"md5": "820bfe42f7d5f741d0a6f5196409e991",
"sha256": "6eef3d542bfaab5f0517285b146ad8ea57a3d11c8bb12a90d9607db4cd29e265"
},
"downloads": -1,
"filename": "termspark-2.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "820bfe42f7d5f741d0a6f5196409e991",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.8",
"size": 31682,
"upload_time": "2024-07-11T18:20:41",
"upload_time_iso_8601": "2024-07-11T18:20:41.663705Z",
"url": "https://files.pythonhosted.org/packages/55/ac/a216f96c330578abf92078f524adc04b8cba638c9b213e13b17f1f583880/termspark-2.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-11 18:20:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "faissaloux",
"github_project": "termspark",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "termspark"
}