superhighfives / pika

An open-source colour picker app for macOS
https://superhighfives.com/pika
MIT License
1.71k stars 55 forks source link

Wrong color with all color formats #102

Open dobladov opened 1 year ago

dobladov commented 1 year ago

Describe the bug No color format matches the real value of the color #ffb305, they are slightly different from the original.

To Reproduce

Expected behavior The color should match the one selected by the tool #ffb305

Screenshots

https://user-images.githubusercontent.com/1938043/235903421-15107c22-564a-4a48-9a58-32873c565f7c.mp4

Environment:

superhighfives commented 1 year ago

Oooh, thanks for sharing a detailed example of the issue, @dobladov. A couple of follow up questions to deeper on this:

  1. Are you using Chrome? If so, if you visit chrome:///flags/#force-color-profile what does it show? (It'll most likely be Default).
  2. Do you have the same issue with RGB? Trying with the following settings I was able to pick the right colour: https://www.colorhexa.com/ffb305 (screenshot below) but I noticed in your video that it's feb rather than ffb, which is unexpected.
image
  1. Could you test with RGB and the ColorSync Utility on Mac? (another screenshot below)
image
dobladov commented 1 year ago
  1. Are you using Chrome? If so, if you visit chrome:///flags/#force-color-profile what does it show? (It'll most likely be Default).

Yes, using the default, those are the other options.

Screenshot 2023-05-09 at 19 01 44
  1. Do you have the same issue with RGB? Trying with the following settings I was able to pick the right colour: https://www.colorhexa.com/ffb305 (screenshot below) but I noticed in your video that it's feb rather than ffb, which is unexpected.

Interestingly, I get almost the correct value using the same profile as you, it might be some rounding error.

Screenshot 2023-05-09 at 19 12 55

The RGB is also slightly wrong for the blue.

Screenshot 2023-05-09 at 19 15 48
  1. Could you test with RGB and the ColorSync Utility on Mac? (another screenshot below)

The colour wallpaper tool also gets a different value #FF9900, which makes me think it might be something wrong with my laptop and not Pika.

Screenshot 2023-05-09 at 19 25 41

Thanks for having a look at it.

superhighfives commented 1 year ago

On 3., it might be because you have web safe colours selected? 🤔

Hmmm, I wonder if it's a rounding issue, like you say. The other issue is that there's a huge number of variables in the calculator (for example, perceptual vs relative or absolute). One thing I'm interested in testing out is a package like https://github.com/sersoft-gmbh/color-components for converting colours, as I ended up adding the math directly to the app.

michaeltroya commented 4 months ago

@dobladov did you ever find a fix for this?

rofrol commented 3 months ago

I have similar problem. kitty terminal. https://github.com/sindresorhus/System-Color-Picker shows correct #6fd2fc color

Screenshot 2024-05-25 at 11 54 27
superhighfives commented 3 months ago

Could you try some of the different colour spaces available in the Pika preferences and see if that helps? Thanks so much. ☺️

rofrol commented 3 months ago

It shows correctly in:

By default it is in System Default (Color LCD).

Which one should I use?

superhighfives commented 3 months ago

I think any of the three should be fine—sRGB is a common colour profile, in my experience, if you'd like to know what you're using consistently on different devices. The other two are likely tied to your monitor, which your system default should be too.