# string-color
string-color is just another python module for coloring strings in print statements.
### Installation
`$ pip install string-color`
### Python Module Usage
```python
from pyscolortype import *
# a few examples without background colors.
# for color names see CLI usage below.
print(cs("here we go", "orchid"))
print(cs("away to space!", "DeepPink3"))
print(cs("final fantasy", "#ffff87"))
print()
# bold and underline also available.
print(cs("purple number 4, bold", "purple4").bold())
print(cs("blue, underlined", "blue").underline())
print(bold("bold AND underlined!").underline().cs("red", "gold"))
print(underline("the bottom line."))
print()
# yellow text with a red background.
# color names, hex values, and ansi numbers will work.
print(cs("warning!", "yellow", "#ff0000"))
print()
# concat
print(cs("wild", "pink")+" stuff")
print("nothing "+cs("something", "DarkViolet2", "lightgrey6"))
print()
# use any working rgb or hex values.
# it will find the closest color available.
print(cs("this will show up red", "#ff0009"))
print(cs("so will this", "rgb(254, 0, 1)"))
print()
# use with format and f-strings
print(f"this is a test {cs('to check formatting with f-strings', 'yellow', 'grey').bold().underline()}")
print("this is a test {}".format(cs('to check the format function', 'purple', 'lightgrey11').bold().underline()))
```
![Usage Screep Cap][screencap]
[screencap]: https://believe-it-or-not-im-walking-on-air.s3.amazonaws.com/sc-screen-cap.jpg "Usage Screen Cap"
### CLI Usage
```
usage: string-color [-h] [-x] [-r] [-t] [--hsl] [-a] [-i] [-v] [color]
just another mod for printing strings in color.
positional arguments:
color show info for a specific color:
$ string-color red
$ string-color '#ffff87'
$ string-color *grey* # wildcards acceptable
$ string-color '#E16A7F' # any hex not found will return the closest match
optional arguments:
-h, --help show this help message and exit
-x, --hex show hex values
-r, --rgb show rgb values
-t, --term show term numbers
--hsl show hsl values
-a, --alpha sort by name
-i, --inverse show inverse colors
-v, --version show program's version number and exit
```
`$ string-color`
display a list of all 256 colors
`$ string-color yellow`
show color info for the color yellow
`$ string-color "#ff0000"`
show color info for the hex value #ff0000
`$ string-color *grey*`
show all colors with "grey" in the name. also works with "grey\*" and "\*grey"
![CLI Screep Cap][cliscreencap]
[cliscreencap]: https://believe-it-or-not-im-walking-on-air.s3.amazonaws.com/sc-screen-cap2.jpg "CLI Screen Cap"
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/shindagger/string-color",
"name": "pycdisco",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Andy Klier",
"author_email": "andyklier@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/23/a0/1b3faf6ee81a5de389d96605ce1107846faf43b97efa24ece1d2ce125465/pycdisco-1.2.3.tar.gz",
"platform": null,
"description": "# string-color \r\n \r\nstring-color is just another python module for coloring strings in print statements. \r\n \r\n### Installation \r\n \r\n`$ pip install string-color` \r\n \r\n### Python Module Usage \r\n \r\n```python \r\nfrom pyscolortype import * \r\n \r\n# a few examples without background colors. \r\n# for color names see CLI usage below. \r\nprint(cs(\"here we go\", \"orchid\")) \r\nprint(cs(\"away to space!\", \"DeepPink3\")) \r\nprint(cs(\"final fantasy\", \"#ffff87\")) \r\nprint() \r\n\r\n# bold and underline also available. \r\nprint(cs(\"purple number 4, bold\", \"purple4\").bold()) \r\nprint(cs(\"blue, underlined\", \"blue\").underline()) \r\nprint(bold(\"bold AND underlined!\").underline().cs(\"red\", \"gold\"))\r\nprint(underline(\"the bottom line.\"))\r\nprint()\r\n\r\n# yellow text with a red background. \r\n# color names, hex values, and ansi numbers will work. \r\nprint(cs(\"warning!\", \"yellow\", \"#ff0000\")) \r\nprint()\r\n\r\n# concat\r\nprint(cs(\"wild\", \"pink\")+\" stuff\")\r\nprint(\"nothing \"+cs(\"something\", \"DarkViolet2\", \"lightgrey6\"))\r\nprint()\r\n\r\n# use any working rgb or hex values.\r\n# it will find the closest color available.\r\nprint(cs(\"this will show up red\", \"#ff0009\"))\r\nprint(cs(\"so will this\", \"rgb(254, 0, 1)\"))\r\nprint()\r\n\r\n# use with format and f-strings\r\nprint(f\"this is a test {cs('to check formatting with f-strings', 'yellow', 'grey').bold().underline()}\")\r\nprint(\"this is a test {}\".format(cs('to check the format function', 'purple', 'lightgrey11').bold().underline()))\r\n``` \r\n \r\n![Usage Screep Cap][screencap]\r\n\r\n[screencap]: https://believe-it-or-not-im-walking-on-air.s3.amazonaws.com/sc-screen-cap.jpg \"Usage Screen Cap\"\r\n \r\n### CLI Usage \r\n \r\n```\r\nusage: string-color [-h] [-x] [-r] [-t] [--hsl] [-a] [-i] [-v] [color]\r\n\r\njust another mod for printing strings in color.\r\n\r\npositional arguments:\r\n color show info for a specific color:\r\n $ string-color red\r\n $ string-color '#ffff87'\r\n $ string-color *grey* # wildcards acceptable\r\n $ string-color '#E16A7F' # any hex not found will return the closest match\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n -x, --hex show hex values\r\n -r, --rgb show rgb values\r\n -t, --term show term numbers\r\n --hsl show hsl values\r\n -a, --alpha sort by name\r\n -i, --inverse show inverse colors\r\n -v, --version show program's version number and exit\r\n``` \r\n \r\n`$ string-color` \r\n \r\ndisplay a list of all 256 colors \r\n \r\n`$ string-color yellow` \r\n \r\nshow color info for the color yellow \r\n \r\n`$ string-color \"#ff0000\"` \r\n \r\nshow color info for the hex value #ff0000 \r\n \r\n`$ string-color *grey*` \r\n \r\nshow all colors with \"grey\" in the name. also works with \"grey\\*\" and \"\\*grey\" \r\n \r\n![CLI Screep Cap][cliscreencap] \r\n \r\n[cliscreencap]: https://believe-it-or-not-im-walking-on-air.s3.amazonaws.com/sc-screen-cap2.jpg \"CLI Screen Cap\" \r\n \r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "just another mod to print strings in 256 colors in the terminal.",
"version": "1.2.3",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "f6e116cf17531d7ac8cf2289f1bbe0f7",
"sha256": "64ddb9a1029073fb48651f7db0eb7571dd41c15d3169204629e6b20051762b7e"
},
"downloads": -1,
"filename": "pycdisco-1.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f6e116cf17531d7ac8cf2289f1bbe0f7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11864,
"upload_time": "2022-11-30T14:37:48",
"upload_time_iso_8601": "2022-11-30T14:37:48.466305Z",
"url": "https://files.pythonhosted.org/packages/04/f1/4a306aafedfc53b05154345b03a1f0e081e485508f8a63b03299de2ddaa0/pycdisco-1.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "9c375b0523eca346d757f70859de9e21",
"sha256": "8f3d54a59b90426b707cfd375555dfe431c4895f24cbcfa0793283341c3ce7fe"
},
"downloads": -1,
"filename": "pycdisco-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "9c375b0523eca346d757f70859de9e21",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12950,
"upload_time": "2022-11-30T14:37:50",
"upload_time_iso_8601": "2022-11-30T14:37:50.886505Z",
"url": "https://files.pythonhosted.org/packages/23/a0/1b3faf6ee81a5de389d96605ce1107846faf43b97efa24ece1d2ce125465/pycdisco-1.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-30 14:37:50",
"github": false,
"gitlab": true,
"bitbucket": false,
"gitlab_user": "shindagger",
"gitlab_project": "string-color",
"lcname": "pycdisco"
}