How to get react native pixel color when clicked?

Viewed 27

I am using a react native app and I want to get the pixel color of the image that I am clicking. I want to do something based the color of the selected pixel. Is it possible to that in react native. I already tried working with react-native-get-pixel-color and it doesn't work. Any kind of help would be greatly appreciated.

The error by react-native-get-pixel-color

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'F:\Testing\React Native\TestingImageAreaSelect\node_modules\react-native-get-pixel-color\android\build.gradle' line: 23

* What went wrong:
A problem occurred evaluating project ':react-native-get-pixel-color'.
> Plugin with id 'maven' not found.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-get-pixel-color'.
> compileSdkVersion is not specified. Please add it to build.gradle

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4s
5 actionable tasks: 5 up-to-date
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
0 Answers
Related