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.
nano-color
Advanced tools
HSV <-> RGB colors conversion utility library. HSV filter, coloring filter, gradients generating.
HSV <-> RGB colors conversion utility library. HSV filter, coloring filter, gradients generating.
[] [travis-url][] coveralls-url
set Gamma correction value
Converts RGB to HSV. Returns array [ h, s, v ].
Returns [ R, G, B ].
Returns [ R, G, B, A ].
Returns [ h, s, v, a ].
Return CSS hex color string -- '#RRGGBB'.
Return SVN hex color string -- '#RRGGBBAA'.
Returns [ R, G, B ]. Eats '#RGB', '#RGBA', '#RRGGBB' and '#RRGGBBAA' formats.
Returns [ R, G, B, A ]. Eats '#RGB', '#RGBA', '#RRGGBB' and '#RRGGBBAA' formats.
Returns [ R, G, B ].
Returns [ R, G, B, A ].
Returns 0xRRGGBBAA.
Put or mix in RGBA to the RGB bitmap array (data).
Put or mix in RGBA to the RGBA bitmap array (data).
Applyes HSV filter to the bitmap pixel.
Applyes Colorify filter to the bitmap pixel.
There are special case for v < 0. A result volume will be calculated by the formula (.21*r + .72*g + .07*b) * -val
.
{ 0: '#000', 4000: '#1234', 6000: 0x33445566, 10000: [ 255, 255, 255, 255 ] }
where, keys of object should be numeric value in bounds between 0 and 10000, that means from 0 to 1.0.
Example:
> var c = require('nano-color');
c.gradient(0, 10, {
0: '#000',
4000: '#1234',
6000: 0x33445566,
10000: [ 255, 255, 255, 255 ]
}, function (pos, RGBA) {
console.log('%s: [ %s ]', pos, RGBA.join(', '));
});
will produce console output:
0: [ 0, 0, 0, 255 ]
1: [ 4, 9, 13, 208 ]
2: [ 9, 17, 26, 162 ]
3: [ 13, 26, 38, 115 ]
4: [ 17, 34, 51, 68 ]
4: [ 17, 34, 51, 68 ]
5: [ 34, 51, 68, 85 ]
6: [ 51, 68, 85, 102 ]
6: [ 51, 68, 85, 102 ]
7: [ 102, 115, 128, 140 ]
8: [ 153, 162, 170, 179 ]
9: [ 204, 208, 213, 217 ]
10: [ 255, 255, 255, 255 ]
FAQs
HSV <-> RGB colors conversion utility library. HSV filter, coloring filter, gradients generating.
The npm package nano-color receives a total of 1 weekly downloads. As such, nano-color popularity was classified as not popular.
We found that nano-color 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.