Chrome default color picker snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copy(value) { | |
setTimeout(async()=>console.log( | |
await window.navigator.clipboard.writeText(value)), 3000); | |
console.log("Color: " + value); | |
} | |
window.colorPicker = () => new EyeDropper().open().then((color)=> copy(color.sRGBHex)) | |
window.colorPicker(); | |
// create color picker snippet | |
// press f12 and ctrl + o | |
// !color-picker | |
// click in document and press tab before 3s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment