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 #29

Open
smfr opened this issue Jul 6, 2022 · 6 comments
Open

Eyedropper API #29

smfr opened this issue Jul 6, 2022 · 6 comments
Assignees
Labels
concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform concerns: maintenance It's not clear the proposal is getting maintained. from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: app-like capabilities Spec relates to native app style capabilities (e.g. things under the "PWA" or "Fugu" brands) topic: web apis Spec relates to web APIs (entry points for script) venue: WICG Proposal is incubated in the Web Incubator Community Group

Comments

@smfr
Copy link

smfr commented Jul 6, 2022

Request for position on an emerging web specification

  • WebKittens who can provide input: @pxlcoder

Information about the spec

Design reviews and vendor positions

Bugs tracking this feature

Brief summary of the issue or the subject of the spec.
API that allows users to choose colors from anywhere on the screen

@smfr smfr added topic: web apis Spec relates to web APIs (entry points for script) topic: app-like capabilities Spec relates to native app style capabilities (e.g. things under the "PWA" or "Fugu" brands) labels Jul 6, 2022
@dcrousso
Copy link
Member

dcrousso commented Jul 6, 2022

I feel like the name for this is less than ideal. Why not something more specific like ColorSampler or ColorSelection (to match ColorSelectionOptions) or something? EyeDropper seems it requires prior knowledge in order to be understood (i.e. the only reason I understand what EyeDropper means is because I've seen UI in the past that uses a pipette symbol/icon to toggle this functionality, but IMO that's kinda an arbitrary decision that someone made and is not necessarily something that everyone would understand).

part of me is also concerned with the subtleties of only changing the cursor into a zoomed color picker selection circle thingy, as i'm not sure it'd be entirely clear to the user what that means (again, unless they've had prior experience with a similar UI) and therefore would somewhat heavily rely on the page itself to convey that "hey I'm gonna show you a color picker now, so the next click will only select a color and nothing more". perhaps when the page is in "eyedropper mode" there should be a requirement for some UI to be shown somewhere indicating this so that there's less reliance on the page (and therefore less ways to abuse this)? or maybe a "Do you want to allow this page to select colors from the screen?" prompt?

@jensimmons
Copy link

This should support all of the color spaces that CSS supports. Not a much older subset.

@smfr
Copy link
Author

smfr commented Jul 6, 2022

There should also be consistency between <input type="color"> and this API in terms of support for color spaces and alpha.

@miketaylr
Copy link

Link to Microsoft's original request for position: https://lists.webkit.org/pipermail/webkit-dev/2021-July/031929.html

@annevk
Copy link
Contributor

annevk commented Sep 2, 2022

I have a concern with the shape of this API: WICG/eyedropper-api#18. Probably not a hill worth dying on, but would be good to fix nonetheless.

With regards to earlier comments, it currently seems aligned with <input type=color>, but that indeed does not have support for anything beyond HTML's simple color concept. I suspect the latter would require some kind of opt-in to fix. For this API you could maybe expose the "real" color as well as the sRGB approximation.

@othermaciej othermaciej added venue: WICG Proposal is incubated in the Web Incubator Community Group from: Microsoft Proposed, edited, or co-edited by Microsoft. labels Sep 25, 2022
@annevk annevk added the concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform label Oct 26, 2022
@annevk annevk added the concerns: maintenance It's not clear the proposal is getting maintained. label Oct 18, 2023
@hober
Copy link
Member

hober commented Jul 15, 2024

It's not clear to me if there's any need at all for a standalone API in a world in which <input type=color alpha colorspace=display-p3> exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concerns: API design The API for this is error-prone, poorly named, or inconsistent with the platform concerns: maintenance It's not clear the proposal is getting maintained. from: Microsoft Proposed, edited, or co-edited by Microsoft. topic: app-like capabilities Spec relates to native app style capabilities (e.g. things under the "PWA" or "Fugu" brands) topic: web apis Spec relates to web APIs (entry points for script) venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
Development

No branches or pull requests

8 participants