Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@sunpietro/color-finder
Advanced tools
It's a small library that allows to find similar color in a given group of colors. Calculations are made Euclidean distance between 2 CIELab color definitions.
Checks the distance between 2 hex colors and finds the closest color to a given sample.
npm install @sunpietro/color-finder
import ColorFinder from `@sunpietro/color-finder`;
const colorsLibrary = [
'#bb3300',
'#aa22ff',
'#b00053'
];
const finder = ColorFinder(colorsLibrary);
There are finder methods available:
updateColorsLibrary
Updates a collection of colors used for comparing with sample colors. Takes one param: colors
as string[]
.
findClosestColor
Finds the closest color to a sample color, in a colors library. Takes one param: color
as string
. Returns the closest color as string
.
checkColorsSimilarity
Compares 2 hex colors in terms of color similarity. Takes two params: color1
as string
and color2
as string
. Returns an Euclidean distance value as number
. The lowest value, the more similar colors are.
FAQs
It's a small library that allows to find similar color in a given group of colors. Calculations are made Euclidean distance between 2 CIELab color definitions.
We found that @sunpietro/color-finder 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.