Technology News

Eye Droppin’

Quick hits! There is a new web API called EyeDropper:

if ('EyeDropper' in window) { const eyeDropper = new EyeDropper(); try { // This has gotta be triggered by a user interaction, // so consider this pseudo-code. const result = await eyeDropper.open(); const colorHexValue = result.sRGBHex; } catch (err) { // The user escaped the eyedropper mode. }
}
  • Here’s a very good blog post intro on it.
  • It’s only in Chrome’n’friends right now.
  • I wish I knew better how to watchdog APIs like this. Looks like it originally came from Edge, then became a community group thing, which is where the draft spec is, which went through a public review before shipping was announced (in Chrome), and now it’s live. Seems like a good process, but also that Chrome can really steamroll right through this process essentially all by themselves. Other browsers really don’t even have to say a word and it still ships. Mixed feelings, but mostly positive, especially because this is such a little bonus feature and not something that I’d consider ultra critical to any web app.
  • You can pick colors from anywhere on your entire screen, which is great. It’ll improve tools like Figma, which has a color picker, but is currently limited to picking off the canvas.
  • It’s already being used in production apps, like Slides.com and Polypane, improving UX. (via Bramus)
  • There is a Chrome Extention. (again, via Bramus)
  • But hey maybe a bookmarklet is just as easy.
  • When you do <input type="color">, the UI popup thingy for that (platform provided) color picker is in it too (at least on macOS), so there is always that. Makes me think that anywhere you use <input type="color"> it would make sense to also offer a progressively-enhanced button right next to it to jump right to the color picker. Hash tag free web component idea.
Some notes on using esbuild
Standardizing Focus Styles With CSS Custom Properties

Related Articles

The Best Markdown Editor for Linux

Exploring the Potential of the Metaverse: A New World Awaits
Using Markdown syntax is my preferred way of writing. I use it to create content for the Web and to jot down simple notes. It’s a simple, minimalistic method of…

So, you want to democratize venture capital

so-you-want-to-democratize-venture-capital
A venture capitalist once told me candidly that whenever you see the phrase “democratization” in tech marketing material, think of it as a red flag. Democracy, generally speaking, often comes…

Ten Top WordPress Ecommerce Themes for 2021

Exploring the Potential of the Metaverse: A New World Awaits
As more people shift to online shopping, small businesses and retailers have been pressured to build their own ecommerce stores to keep up. The good news is that creating an…

Shallow vs. Deep Copying in JavaScript

Shallow vs. Deep Copying in JavaScript
Copying and modifying objects in JavaScript is never as simple as it seems. Understanding how objects and references work during this process is essential for web developers and can save…