Elvyria / wcolor

Lightweight color picker for Windows written in rust
MIT License
13 stars 1 forks source link

Question about usage #3

Closed rashil2000 closed 2 years ago

rashil2000 commented 2 years ago

Hey!

A few months ago I was searching for commandline color pickers for Windows, because the popular utility pastel requires one. The only ones I could find were GUI pickers, which I listed here - https://github.com/sharkdp/pastel/issues/150

Because they're GUI pickers, they can't report the picked color back to the calling application.

wcolor solves this problem nicely. It provides a picker and writes the color to stdout. Thanks for making this!

So I want to ask if it fine to add picking support to pastel on Windows, utilizing wcolor.

rashil2000 commented 2 years ago

Also, would it be possible to modify preview window size and scale? The movement of preview window is pretty smooth for me (as opposed to #1), but since I have a big monitor it appears quite small.

Elvyria commented 2 years ago

Yes it's okay for third party tools to utilize wcolor. This project, apart from solving the color picking issue, was also meant as educational resource for other people to learn how to utilize WinAPI and Direct2D in rust, and so it has MIT license.

About the resolution scaling issue, hmm... i don't have experience writing scaling code for different resolutions, but hard-coded values for 1080p are here and here. If you want to add some form of scaling or just command line arguments to change size, feel free to open PR. I'll also take a look at scaling subject, but i can't make you any promises.

rashil2000 commented 2 years ago

Thank you for the response!

I'll see what I can come up with (I have very little experience with either Rust or WinAPI).

Elvyria commented 2 years ago

I added an option to modify preview size. Not sure if it's a good enough solution for bigger resolutions, HDPI or whatnot. If it doesn't fully suffice, feel free to open another issue with description.

Version is updated. Corresponding commits: d1025290f68890dba737d1754cf7bfca43170dff a36ad2e5afb9da9db4f17975ab4eb21b9ffb1f4b

rashil2000 commented 2 years ago

Hi!

Yes, the new option works perfect, thanks!