WICG / eyedropper-api

Other
69 stars 7 forks source link

Linux Gnome Chrome rgba instead of hexCode Eyedropper API #28

Open LarsFlieger opened 2 years ago

LarsFlieger commented 2 years ago

Summary

When you are using the EyeDropper API to pick a color on Gnome Linux devices you will get back rgba(8, 103, 210, 0) instead of #0867d2. It's strange that the value also has 0% opacity.

This is the code I'm using:

async function startEyeDropper(): Promise<string | null> {
    const eyeDropper = new EyeDropper()
    try {
        const result = await eyeDropper.open()
        return result.sRGBHex // <- should return hex code
    } catch (e) {
        return null
    }
}

Current behavior

Gives back rgba string format rgba(8, 103, 210, 0).

Chrome 101.0.4951.64 (Official Build) (64-bit)
Ubuntu 20.04.4 LTS

Expected behavior

Should give back hex format (as name of property says) #0867d2

inexorabletash commented 2 months ago

This sounds like an implementation issue, rather than a specification issue. Did you file an issue against Chromium?

LarsFlieger commented 2 months ago

When you are using the EyeDropper API to pick a color on Gnome Linux devices you will get back rgba(8, 103, 210, 0) instead of #0867d2. It's strange that the value also has 0% opacity.

UPDATE: I did: https://issues.chromium.org/issues/352218913

I'm not sure if with never chrome version it is working.