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
MaxGradient automates the printing gradient colored text to the console. It's built upon the great rich library. It contains a Console that can serve as a drop in replacement for rich.rich.Console and has an expanded Color class which can parse X11 color names on top of rich's standard colors. MaxGradient is a work in progress and I'm open to any suggestions or contributions.
MaxGradient can be installed from PyPi using your favorite package manager:
pdm add maxgradient
pip install maxgradient
The basic usage is to create a console object and use it to print gradient text:
import maxgradient as mg
console = mg.Console()
console.gradient("Hello, World!")
You may also instantiate a Gradient Object. The Gradient class is a subclass of the rich.text.Text class, and can be used in the same way. The Gradient class has a few extra arguments available though.
class Gradient(rich.rich.Text):
"""Text with gradient color / style."""
def __init__ (
ext: Optional[str | Text] = "",
colors: Optional[str|List[Color | Tuple | str]] = None,
rainbow: bool = False,
invert: bool = False,
hues: Optional[int] = None,
color_sample: bool = False,
style: StyleType = Style.null(),
*,
# The arguments below are used directly by Text
# so I won't cover them here. If you have
# questions check out the rich documentation.
justify: Optional[JustifyMethod] = None,
overflow: Optional[OverflowMethod] = None,
no_wrap: Optional[bool] = None,
end: str = "\n",
tab_size: Optional[int] = 8,
spans: Optional[List[Span]] = None,) -> None:
The Gradient class can utilize the above arguments to get a plethora of different gradients.
The final main component of MaxGradient is expanding the rich.color.Color class. The MaxGradient .Color class can still parse and utilize the rich.color.Color's standard colors but in addition to Hex and RGB colors, it can also parse RGB Tuples as well as X11 color names. I've also included the colors that MaxGradient uses to create random gradients from for convenience. The follow are the available named colors as well as there hex and rgb colors:
import maxgradient as mg
console = mg.Console()
console.print("[bold green]This is a a vibrant green color!")
FAQs
A CLI for maxludden/maxgradient
We found that gradient-cli 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.