pycdisc


Namepycdisc JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://gitlab.com/shindagger/string-color
Summaryjust another mod to print strings in 256 colors in the terminal.
upload_time2022-11-30 09:41:09
maintainer
docs_urlNone
authorAndy Klier
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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": "pycdisc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Andy Klier",
    "author_email": "andyklier@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8c/90/50bf6cc7ccd85d33583a8bb4b484e2d9fb5253b07b5d05181bf87d6e2be5/pycdisc-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": "882e9c6bcc139505fb2b9b50dc54bd2e",
                "sha256": "91ffd150c444b8c89bda2fc282d66379a89d147506149bff70a1758b98ad703c"
            },
            "downloads": -1,
            "filename": "pycdisc-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "882e9c6bcc139505fb2b9b50dc54bd2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11878,
            "upload_time": "2022-11-30T09:41:08",
            "upload_time_iso_8601": "2022-11-30T09:41:08.314446Z",
            "url": "https://files.pythonhosted.org/packages/c4/70/feb9a6c141cb1eb579abb3e8ad2aff2940c17c8cba3abb875c64ab016ad2/pycdisc-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "0c07af13a11f6b1def002d01700b0334",
                "sha256": "f83437525ea65b2ed546fc67fc0cad0193a34135eb41b70bfa07d0fddd6c1257"
            },
            "downloads": -1,
            "filename": "pycdisc-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0c07af13a11f6b1def002d01700b0334",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12975,
            "upload_time": "2022-11-30T09:41:09",
            "upload_time_iso_8601": "2022-11-30T09:41:09.939650Z",
            "url": "https://files.pythonhosted.org/packages/8c/90/50bf6cc7ccd85d33583a8bb4b484e2d9fb5253b07b5d05181bf87d6e2be5/pycdisc-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-30 09:41:09",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "gitlab_user": "shindagger",
    "gitlab_project": "string-color",
    "lcname": "pycdisc"
}
        
Elapsed time: 0.01355s