Search code examples
reactjsnext.jscolor-picker

Pick Color on Screen Tap/Click - React


I want to develop an app that has a button.

When the user taps the button, the user will be prompted to tap/click on any part of the screen and the state should be able to get the color of whatever is tapped/clicked.

Additionally, the user should be able to see a tiny magnified screen as long as they haven't let go of their tap/click.

In other word, an eyedropper color-picker for JS web app like this

However, I can't seem to find any library that can support this feature. The best I can find is React-colorful, however, it is still using a library built-in color picker box which I do not want.color picker box

Is there any library that can support the feature I'm looking for (eyedropper color-picker)?


Solution

  • For example - you can shot your screen, draw canvas and get color from him.

    I create small app here. You can check it:

    https://codesandbox.io/s/suspicious-yonath-jdxs9v?file=/src/App.js