Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EyeDropper API #557

Open
ipopescu93 opened this issue Jul 22, 2021 · 6 comments
Open

EyeDropper API #557

ipopescu93 opened this issue Jul 22, 2021 · 6 comments
Assignees
Labels
concerns: API design concerns: integration topic: API venue: W3C CG Specifications in W3C Community Groups (e.g., WICG, Privacy CG)

Comments

@ipopescu93
Copy link

ipopescu93 commented Jul 22, 2021

Request for Mozilla Position on an Emerging Web Specification

  • Specification Title: EyeDropper API
  • Specification or proposal URL: https://wicg.github.io/eyedropper-api/
  • Caniuse.com URL (optional):
  • Bugzilla URL (optional):
  • Mozillians who can provide input (optional):

Other information

TAG review: w3ctag/design-reviews#587
Chrome Status entry: https://chromestatus.com/feature/6304275594477568

Thanks!

@arayaryoma
Copy link

I'm curious about this too.

Chrome has announced to ship this feature.

Intent to Ship: EyeDropper API
https://groups.google.com/a/chromium.org/g/blink-dev/c/rdniQ0D5UfY/m/Aywn9XyyAAAJ

@annevk
Copy link
Contributor

annevk commented Sep 23, 2021

I think overall this seems reasonable. There's a bit of an open question with regards to how much UI is needed to get the user to reveal a color on their screen. Is an overlay enough (a la Fullscreen) or do we want to have the user explicitly confirm they want to share the color with the page? The former is probably more desirable for drawing applications, but might be problematic without something like cross-origin isolation as suggested in WICG/eyedropper-api#13 as it would make stealing cross-origin pixels easy-ish.

It seems Chromium decided to ship this (it works on Canary at least) without such issues being resolved. Not sure if that was intentional? cc @mikewest

@annevk annevk added the venue: W3C CG Specifications in W3C Community Groups (e.g., WICG, Privacy CG) label Sep 23, 2021
@ipopescu93
Copy link
Author

thanks @annevk! There are some mitigations currently in place to prevent stealing cross-origin pixels. We are also going to monitor the use of this API in the wild for abuse to see if any follow-up mitigations are needed.

@zcorpan zcorpan changed the title Request for Position: EyeDropper API EyeDropper API Mar 13, 2024
@zcorpan
Copy link
Member

zcorpan commented Mar 28, 2024

@sefeng211 and I looked at the spec. Here are our concerns/questions so far:

@yisibl
Copy link

yisibl commented May 25, 2024

I'd like to add that it would also be useful to provide an option to show the current color value(HEX,RGB etc.). This is provided in the Eyedropper in Firefox DevTools.

image
<input type="color" eyedropper format="hex">

Chrome shows it as rgb, and when you open Eyedropper's popup, pressing the spacebar toggles whether the color value is shown or not.

image

@StephenHaney
Copy link

StephenHaney commented Sep 28, 2024

Just to add a few use case examples (we make design tools in the browser)

  1. We'd definitely need wide gamut and for it to "convert down" accurately. We probably won't be able to use it if it assumes SRGB and gives incorrect values on wide gamut screens.

  2. We would also make use of showing the current color code with the reticle.

Ideally you could specify the format. See this example from Figma's color picker. I last used HSL so it's showing me HSL codes. Right now Chrome always shows RGB.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concerns: API design concerns: integration topic: API venue: W3C CG Specifications in W3C Community Groups (e.g., WICG, Privacy CG)
Projects
Status: Needs proposed position
Development

No branches or pull requests

6 participants