Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
string-color is just another python module for coloring strings in print statements.
$ pip install string-color
from stringcolor 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: 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"
FAQs
just another mod to print strings in 256 colors in the terminal.
We found that string-color demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.