Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
color-gradient-generator
Advanced tools
This package will generate a color gradient. The colors, the number of colors generated, the color format, the hexadecimal prefix are configurable.
This tool will allow you to generate a color gradient from RGB, decimal or hexadecimal. The source code is available on GitHub.
Every color of the gradient has a value, and that is all you see, but in fact, there is a class named Color
, which have a "value" argument.
With this class, you can access the color format. The purpose of this class is also to convert its original value to all of the available formats, in case you want your gradient in a specific format.
There are 3 color formats, accessible by the ColorFormat
Enum class:
A lot of time, while you use this generator, error will raise. A lot of them would just be TypeError
of AttributeError
, but custom errors is a thing. At the moment, only one was created.
This error raises when the color argument of the Color
class is incorrect.
The color generation is accessible by the generate_gradient
function. There are 3 kwargs : the two colors and the amont of variations to add in the gradient. Then there are 2 optionnal args : _format, which is the format in which the gradient will generate, and hex_prefix, useful only if you generate an hexadecimal gradient.
If the amont of variations provided is too high in relation to the difference between the two colors, an error will raise. You can have up to 500 variations.
If you do not provide a "_format" argument, it is necessary that both colors have the same format.
If you do not provide a "hex_prefix" argument, there will simply be no prefix.
Well then, that's about it, have fun !
FAQs
This package will generate a color gradient. The colors, the number of colors generated, the color format, the hexadecimal prefix are configurable.
We found that color-gradient-generator 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.