ImageEyes offers the genuine colordata of images at your webpage, to serve scientific purposes. Unlike traditional eyedroppers, it buffers the image and reads color value from there without the browser doing recalculations or corrections.
Install the package as npm package. Provided are a umd-formatted file in the dist folder to require or just read and an es-module in the module folder to import.
Get the API thru an async function:
const eyes = await imageEyes(url)
Then you'll be able to have your eyes at pixel-values and metadata:
eyes.getPixelColor(xCoordinate, yCoordinate)
// => an array with color and alpha channels
eyes.getDropColor(xCoordinate, yCoordinate, sampleSize)
// => an array with average color and alpha channels
eyes.getColorMode()
// => a string
eyes.getColorProfile()
// => a string
eyes.getMetaData({exif|gps|icc|ifd0|iptc|xmp: true})
// => an object
Start the demo server with
npm start