There is a fairly new Web API supported in Chrome, Edge, and Opera that lets you use JavaScript to add an EyeDropper to the page. The EyeDropper allows the user to select the colour of any pixel on the page.
Note: The API can only run over localhost OR any URL using HTTPS.
Code from Video: https://gist.github.com/prof3ssorSt3v3/acde7bf664a9663599efbd8de38ea7a3