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.
react-native-get-pixel-color
Advanced tools
Returns the pixel color from a graphic at a given coordinate.
Install the package:
React-Native 0.29.2+
npm install --save react-native-get-pixel-color
react-native link react-native-get-pixel-color
React-Native < 0.29.2
npm install rnpm -g
rnpm install react-native-get-pixel-color
Note: on latest versions of React Native, you may have an error during the Gradle build on Android (com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim
). Run cd android && ./gradlew clean
to fix this.
import PixelColor from 'react-native-get-pixel-color';
PixelColor.getHex(imageUriOrData, { x, y }).then((color) => {
// #000000
}).catch((err) => {
// Oops, something went wrong. Check that the filename is correct and
// inspect err to get more details.
});
Examples are found in the the examples
folder.
promise getHex(path, options)
The promise resolves with a string containing the uri of the new file.
Option | Description |
---|---|
path | Path of image file, or a base64 encoded image string prefixed with 'data:image/imagetype' where imagetype is jpeg or png. |
options | { x: int, y: int } |
FAQs
React Native Get Pixel Color
The npm package react-native-get-pixel-color receives a total of 7 weekly downloads. As such, react-native-get-pixel-color popularity was classified as not popular.
We found that react-native-get-pixel-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.