superhighfives / pika

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

Paste color in differend format #114

Closed Hydro8 closed 5 months ago

Hydro8 commented 7 months ago

Is your feature request related to a problem? Please describe. I use color picker with different app at my work. Sometime I need a color in RGB format and sometime in hex format.

Describe the solution you'd like Coming from windows, I used share X where I opened color picker, click to copy color un rgb format or alt + click to copy color in hex format.

By the way, thanks for your great app :)

superhighfives commented 7 months ago

Ooooh, thanks for the suggestion @Hydro8. So you're thinking some kind of modifier key (for example, Control + Command + c) to get different formats independently of what you've got selected in the UI? Were you thinking that this specifically would be handled by a modifier key?

Hydro8 commented 7 months ago

Yes something like that.

Or maybe it’s possible to handle this when we click on the screen :

superhighfives commented 7 months ago

Unfortunately Apple's API for grabbing colours from the screen (without needing complex and privacy adverse permissions to be granted) is pretty limited: https://developer.apple.com/documentation/appkit/nscolorsampler

I'm not aware of any way to differentiate types of clicks or shortcuts when using the Apple API. If anything changes on that front I'd love to implement more options for the colour picker interface (showing the colour inline in the picker, allowing different "types" of picking with keyboard shortcuts etc.

Hydro8 commented 7 months ago

Ok I understand. So maybe use a modifier key.

superhighfives commented 7 months ago

One other thought is that maybe PIka could have a shortcut to move between hex, rgb, hsb and hsl. Possibly Command + 1, Command + 2, etc. 🤔

Will keep this one open to see if it resonates with others. Also if anyone wants to take a pass at it, I'd love to check out a PR. 👍

Hydro8 commented 6 months ago

What do you think of adding deeplink to pika ?

Like "pika://pick/hex" to pick in Hex format "pika://pick/rgb"...

That's way we can use our own shortcut app and we. can use pika with other apps like raycast.

superhighfives commented 6 months ago

Ooooh, I love this idea. I'd also love to add keyboard shortcuts to move between colour formats. Will take a look, try and get something beta. 👍

Hydro8 commented 6 months ago

Nice thanks a lot for considering this :)

superhighfives commented 5 months ago

This is now released as 0.0.17-beta1, which you can download from https://github.com/superhighfives/pika/releases/tag/0.0.17-beta1, or by checking "Subscribe to beta releases" in Pika's settings and then "Check for updates..." in the menu. Thanks @Hydro8, hope it helps!

Any feedback or issues, please let me know.

superhighfives commented 5 months ago

Also, the list of URL schemes is here: https://github.com/superhighfives/pika/tree/0.0.17?tab=readme-ov-file#url-triggers

Hydro8 commented 5 months ago

Thanks a lot ! The url scheme works well by itself.

However, I can't make it work with raycast quicklinks sadly. When I choose to open the quicklink with arc, it worked but it's slow because it must open arc fist. When I choose to open it with pika directly ,nothing happen.

superhighfives commented 5 months ago

Thanks for flagging, @Hydro8. Seems to be working fine for me, so I'm keen to dig into it for you. Screenshot attached of my setup:

image
superhighfives commented 5 months ago

Would you mind sharing yours?

Hydro8 commented 5 months ago

I tried your setup but nothing happen. Before , I use the same setup as you, without the variable.

superhighfives commented 5 months ago

Hmmm, I've tried it on two set ups now, seems to be working as expected. I wonder if someone else would be able to give it a shot? Just to confirm, you're definitely running the latest version—just thinking if an older version is somehow running at the same time it might be clashing. You can double check your activity monitor here:

image

And the version is available in About:

image
Hydro8 commented 5 months ago

Ok I reinstall pika beta and raycast and it works nice now ! Well done, thanks a lot !

Last thing to imprive my workflow, will it be possible to add format to deeplink ?

Like "pika://pick/rgb/background" or "pika://pick/hex/background". Or even shorter "pika://rgb/background".

Right now, I must run two quicklinks to pick color on another format.

superhighfives commented 5 months ago

Yeah, for sure—I started looking into it when I was pulling this together. I'm keen to explore that for 0.0.17-beta2. Thanks for flagging.

superhighfives commented 5 months ago

Alrighty, got this working for 0.0.17-beta2. As there hasn't been any other feedback I'll release it shortly.

superhighfives commented 5 months ago

Aaaaand it's released as 0.0.17-beta2, which you can download from https://github.com/superhighfives/pika/releases/tag/0.0.17-beta2, or by checking "Subscribe to beta releases" in Pika's settings and then "Check for updates..." in the menu. Thanks @Hydro8.

Any feedback or issues, please let me know.

Hydro8 commented 5 months ago

Hell yeah ! Very nice !

Thanks a lot @superhighfives, I really like your app and it's even better for my workflow.

Thanks again for adding these features quickly.