Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6314

How can I get the color information of a pixel in React Native?

$
0
0

I’m trying to implement color picking through the device camera in a project with expo-camera. In order to do this, I need to access the color information pertaining to a specific pixel on the screen, following user interaction.

What would be the best way to get that information?

My first thought was to snap a picture and use the tap coordinates to find the pixel I’m searching for in the image, and then extract the information from that image. To that end, I tried using the react-native-pixel-color library, but it seems it’s been abandoned. If this is indeed the best way of going about this, it’d be great to get some pointers as to how I can implement this functionality myself.


Viewing all articles
Browse latest Browse all 6314

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>