Zen picker

I wanted to share this plugin I built for myself. I’m mainly an rgb slider user but it’s annoying to control saturation and value with just those 3. So I added a value slider that is the “main” slider. It does not change based on the rgb values but limits them. This way I can go crazy with color variation using rgb sliders while keeping my value structure organized.

I also added a small color mixer meant for the main and ambient light. Just to make it easier to have consistent light and shadow color. Best used along with the color Palette docker in my opinion. This is an experimental feature, not sure if I like it yet and maybe I’ll find things to improve it. Gonna have to use it for a few paintings to see how it feels.

If you want to use it, sorry it might be annoying to install. (more on github readme)

24 Likes

First I have to say thank you for your work!

And then I have to apologize to bother you. But I just tried installing your plugin, with installing rust and VS there were no issues, because they were installed already and up to date since I’m in the process of setting up my PC anew. Also, cargo install just built without issues.
But then running just distribute drops this error, no matter if I use the first archive I downloaded, according to the building time in the archive from 16.06.2025 18:08, 623.560 Bytes, or the second one from 16.06.2025 19:36, 623.591 Bytes:

E:\zen_picker-main>just distribute
cd zen_lib && cargo build -r
error: Recipe `release` could not be run because just could not find the shell: program not found

Here I’m asking myself which shell exactly can’t be found, since everything should be accessible via PATH or known definition? So, here I’m at a loss with my non-existent coding skills.
Or does just expect to find the ancient, and no longer used, variables SHELL or comspec to be set pointing to explorer.exe and cmd.com? Because Windows no longer defines them, I thought, these variables are now tacitly assumed to be already known/given/existing.

Michelist

Hi, sorry for the inconvenience. I’m building this on Linux so some of the scripts (in the justfile) might not be compatible with Windows, it could also have problems with the paths. It might be cp command I used to move a file around. I’ll boot up Windows and get back to you.

I pushed an update. This is the new command to build on windows:
just --shell powershell.exe --shell-arg -c distribute_win

Let me know if this works for you.

Yep, the path to Krita is a different one using Windows, where several different paths’ are possible. That is because the Steam, the Epic-Store and the Microsoft-Store installations of Krita use different path’s, furthermore, users can install (unzip) the (original) portable version offered by the Krita-Foundation wherever they want, the same is true for the portable versions offered by PortableApps.com.

Windows paths use backslashes, at least internally. Krita, as a program originating from the Unix world, traditionally uses Unix/Linux notation in its configuration files, so it has to translate this internally somewhere. I don’t know how Rust handles this, and I haven’t looked at your source code for this. In your justfile, I tried both the relative and absolute paths for Krita, without success.

But even for Linux users, your design could be a problem. This is because you assume that users will use the official AppImage, but a large part of the Linux community uses the repository version provided by their distribution, and Snap and Flatpak are also used. This can be difficult, at least for those Linux users who are not tech-savvy and are at odds with the command line.


At least we got further, I have not installed it right now, because, while building, it dropped the following, if that will stop the show I’ll see later:

warning: unused variable: `s`
  --> src\lib.rs:37:17
   |
37 |         let (h, s, v) = rgb_to_hsluv(r, g, b);
   |                 ^ help: if this is intentional, prefix it with an underscore: `_s`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: `zen_lib` (lib) generated 1 warning
    Finished `release` profile [optimized] target(s) in 24.94s
copy ./zen_lib/target/release/_zen.dll ./lib_zen.pyd
PS E:\zen_picker-main>

And because it is 5:45am right now, and I have to sleep a few hours more, I just awoke before the night was over and checked your fix, I’ll tell you later if it works.

Michelist

This plugin looks incredibly interesting! I tried to install it this morning but unfortunately I can’t seem to use it. I’m running Windows 10 and followed the instructions on the github without error, but upon launching Krita, the Zen Picker plugin is checked but grayed out and the docker is not presented as an option in the dockers dropdown.
image

1 Like

Any further progress on this one? Looks awasomw, but I’m not going through that procedure.. ( yep, I’m all the noob I can be! :grinning_face_with_smiling_eyes:)

I haven’t checked it further back then, but I was not able to make it run. Perhaps there have been made changes to the installation process in between, but I can’t tell. Let’s see what the OP will say.

Michelist

1 Like

On the settings plugin list hover your mouse over the plugin grey text and it will popup a message with the cause of the error. Screenshot that popup to report back so it can be fixed. Ocasionally there is no message which is rare but can happen, keep that in mind.

HI @EyeOdin - attached the errors.

Edit: @Michelist Ping me regarding the lib_zen.pyd file I compiled. It got flagged by VirusTotal. Not sure what went wrong with the process, I just followed XanderJakeQ’s procedure.

Update: I scanned my PC, and everything looks fine on my end. It’s probably just a false positive since it was compiled on a new compiler (rust). If you are still interested, you can download the compiled file here and paste it on zen_picker folder: Unique Download Link | WeTransfer

I don’t know the reason, but I thought you should at least be aware of it.
As I wrote via PM, the fact that my compilation is 240,128 bytes in size and yours is 1,700,619 bytes, which is seven times larger, is unusual. We both compiled for Windows, so they should be roughly the same size. And I used the same compilers, with my compilation not dropping a single hit:

Michelist

Add/Edit: Currently you offer at least a possible Trojan horse, and that after being informed about the fact, which is a very questionable behavior.

I’m pretty new to this, and I was eager to try the plugin and ask ChatGPT for help. As per chatgpt regarding the file size on rust compiler.

Perfect :smiley: so the average .pyd size in projects using Rust + PyO3 is:

:1234: Typical sizes (release build, stripped)

  • Hello world extension (super simple) → ~600 KB – 1 MB

  • Math / image utilities (like your color conversions) → ~1 MB – 3 MB

  • Crates with many dependencies (crypto, serde, regex, etc.) → 3 MB – 8 MB

  • Heavy libraries (numpy bindings, big DSP libs) → 10 MB+

:pushpin: So your lib_zen.pyd at 1.2 MB → falls right in the expected range.
In fact, it’s smaller than most PyO3 builds, which means it has few dependencies (mostly just color math).

I think the file size can be optimized. Can you share your compiled version?

1 Like

We ran the same code with the same compilers on the same platform → Windows. A “typical size” says exactly nothing!
And your comparison is like determining a thief by the color of its car, not trustworthy.

Michelist

Add/Edit:

And I’ve been in the business for a long time, and here I’m slowly getting the feeling that I’m being offered sour beer. Which doesn’t have to be the case. I’m just wondering why you want to push it so vehemently on users?

All good. I’m not pushing anything, just testing the build for my own Krita setup and sharing my results. Virustotal flagged mine, but it runs fine, so I was just checking if others saw the same. No pressure at all. :slight_smile:

&

Most Malware runs fine to lull their users to trust and stay as long as possible …
And as I said it can be, it must not, it only feels strange.
Okay, you are happy, possibly/maybe this was your first “successful” compiled program, I don’t know. I’m only cautious, it is better to not spread a possible “goodware”, than to spread a possible malware

Michelist

2 Likes

I tried to install the file using the creator’s tutorials, Krita tutorials, YouTube instructions, and even the chat I got… and I always end up here.

Hello, I want to thank you for your effort for making this tool available in Krita!

I lack experience in programming so I had a difficult time in following the steps it seems there are other important steps I’m missing and I couldn’t figure it out.

How did u fix this? the plugin appear in python plugin manager but like the same it was with you

I have managed to compile a working version, if it will work for you, I can’t say, but if you don’t try you don’t know. It is the Windows version.
And the best for you: “You can import it like every plugin!”

Michelist

Add: I forgot to mention, VirusTotal says it is clean so far - but currently two sandboxes haven’t ended their scan, only the 66 normal scanners couldn’t find anything malicious.

1 Like

It worked! that saved me a lot of time, thank you very much!

but the thing is it still appear this way

and isn’t in the Dockers

The same thing with the Plugin Buli Notes unless it appears in the Python plugin manager