1.8.2 • Published 6 years ago
@digitalattitude/getclickedcolor v1.8.2
GetClickedColor
ListenForClick
Calls the provided callback every time that the user clicks anywhere on the screen. The callback is called with the clicked color (RGB).
GetPixelColor
Gets the color of a pixel at a given position.
Testing
$ node-gyp rebuild
$ node example.js
Tested with node 9 on Windows 10, 64 bit.
Usage
$ npm install @digitalattitude/getclickedcolor
$ npm rebuild
const getClickedColor = require("@digitalattitude/getclickedcolor").eventProvider;
getClickedColor.on('click', ({ color, position }) => { /* ... */ })
Tested with node 9 on Windows 10, 64 bit.
Credits
Inspired by https://nodejs.org/api/addons.html#addons_callbacks Clicks to some windows, most notably the Task Manager, cannot be tracked (probably applies to all topmost windows).
License
MIT