Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
stylelint-color-format
Advanced tools
A Stylelint plugin to convert HEX colors to either RGB or HSL formats.
npm install --save-dev stylelint-color-format
In your Stylelint Configuration, add the following to the plugins array. (Make sure the plugins array comes before your rules block):
{
"plugins": ["stylelint-color-format"]
}
And then, in the rules:
{
"rules": {
"color-format/format": {
"format": "rgb"
}
}
}
The rule itself works much like the default color-no-hex
rule. It will report if a HEX color format (#333, #CA4FBD and even #FFFFFFAB) is found, it will error out since the format is not what we want.
If you pass the --fix
option, however, the color format will be converted to either rgb
or hsl
, according
to your configuration
The color-format/format
rule accepts an object with a single format
key.
rgb
| rgba
This will convert any HEX colors to RGB. If the HEX color has a transparency, the RGBA format will be used.
hsl
| hsla
This will convert any HEX colors to HSL. If the HEX color has a transparency, the HSLA format will be used.
LICENSE - MIT
FAQs
Convert Hex colors to either RGBA or HSLA
We found that stylelint-color-format demonstrated a not healthy version release cadence and project activity because the last version was released 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.