
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
re-color-contrast
Advanced tools
Calculate color contrast of two colors, by using WCAG standard calculation.
Calculate color contrast of two colors. The result is a number between 1.0 and 21.0, and can be used to determine if contrast fullfills WCAG success criterion for color contrast.
yarn add re-color-contrast
Then add re-color-contrast as a dependency to bsconfig.json:
"bs-dependencies": [
+ "re-color-contrast"
]
open ReColorContrast;
let blue = "#00f";
let green = "#00ff00";
ColorContrast.getContrast(blue, green); // 6.2618 ...
ColorContrast.getRelativeLuminance(blue); // 0.0722
getContrast(string, string) => float - takes in two hex color strings and returns a float in range [1..21]. 1 is no contrast, and 21 is best contrast (colors of opposing side of spectrum). See WCAG for details on calculation.getRelativeLuminance(string) => float - takes in a hex color string and returns a float in range [0..1]. 0 is no luminance and 1 is max. See WCAG for details on calculation.yarn.lock is updated.FAQs
Calculate color contrast of two colors, by using WCAG standard calculation.
We found that re-color-contrast 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.