Max color picker

when you are over a color property you can press E to activate the eye dropper
but this is not working out of Blender.
so press Ctrl E instead of E, and you can go out of blender and left clic on the color you want to select. done!

5 Likes

Hi 1C0D,

Chookity!! Nice and simple addon. I love it. Just tested it and it works well. Has trouble though when grabbing a color from a second monitor (I’m using Win 10). I just end up with black (0,0,0). Other that that this is a great little addon. I see myself using this quite a bit.

Cheers and stay safe!

1 Like

ok thks for this information. I’ve planed to do this. I needed a confirmation because I have only 1 screen :slight_smile:

I recommend you this one too simple and I use it a bunch https://github.com/1C0D/Open-OS-Browser

and this one too if you want never loose some work

I add another one because this is very needed to work with the console opened particularly if blender freeze. it allows to pass open and pass the console over others windows https://github.com/1C0D/Toggle-Console-on-Top-WindowsOnly--Blender

can you tell if it’s working now?
max_color_picker.py (2.8 KB)

Hi 1C0D,

Seems to work ok now except for applications like the Win 10 Task Manager. For me it freezes Blender until I click on something else other than the Task Manager. Other apps like Chrome, FireFox, Photoshop, IE, Excel, Remote Desktop, Windows Desktop and the Windows Task Bar and Menu too all seem to work well.

Another issue I found is the colors are not exactly the same. Perhaps, Blender is doing some gamma correction or something else is happening. Tried Filmic or Standard but that didn’t make a difference. This happens regardless of the monitor I choose.

I’m using K-Cycles 2.93.2 and Win 10 Pro 64bit, Version 21H1 OS Build 19043.1165.

Above is a screenshot that grabbed both at the same time so you can see it also. The red line shows where I clicked. I used https://www.colorspire.com/ to grab a color from within FireFox.

Looking at this in Photoshop the Blender color is RGB ([0.549020, 0.223529, 0.211765, 1.000000]) (or RGB (208, 120, 125) as per Photoshop) while the Website color is (161, 48, 52) which Photoshop confirms.

Hope I’m making this clear enough.

Cheers and stay safe!

2 Likes

max_color_picker.py (2.9 KB)

ok I have exactly same result now.

for info I calculated the gamma like this:

using ‘E’, I get these values

let’s take the red 0.27
now if I do ctrl E I get exactly same result but in the console you can see ‘tot’
here [142, 150, 153] they are RGB values of the pixel that I’m printing
so the gamma we want to calculate is
log(0.27,142/255) I pasted there https://web2.0calc.fr/

I took average value with RGB so finally 2.237
and to convert I do: b = ((a / 255) ^ gamma)

N.B: I added protections against errors. but I couldn’t reproduce the error you described

and for the moment I use only 1 pixel. I will see it later. maybe 4 pixels by default and/or properties…

1 Like

I tried this version on WIndows 10. But my blender freezes like someone else said, until I click in some cases.

Also I cant sample outside the blender window it seems like? Or maybe its just a cursor icon issue.

Edit: Oh wait! Yeah it does work outside of blender, sampling in like Pure Ref. Just the Icon is not there/consistent, so didn’t think it was working.

1 Like

yes he told about task manager only but I added an error protection. the cursor is linked to blender window outside this is the OS cursor. but I can’t change the cursor for every OS…

1 Like

Is still very cool that it works, even if the cursor doesn’t change!

1 Like

Were you using Ctypes or anything like that?

1 Like

yes I can do it system by system. I will certainly consider it.

1 Like

problem I install pypiwin32 but I can’t never import win32api, win32conf

Yeah, i had issues like that. I used Ctypes before for mouse events/etc, but, gotta find right thing…

I can poke around more too.

Hi 1C0D,

Updated the plugin but unfortunately I still don’t get a matching color for some reason. Can’t tell why at the moment. Here I’ve grab it from the same screen. Visually it’s closer but still not exact.

image

Cheers,
Paul

try to modify the gamma with the RGB values or change the photo by a RGB view and give me the value tot in console. I can try to calculate it for you.
but I touch the limit of my knowledge after :slight_smile:
I think blender deals with the screen material but this is very obscur and I receive 0 help from the blender python forum so… Campbell told me this: “system wide color picker support from Blender is a feature request.” so maybe someone will deal with it in Blender.

Yeah i think the issue I had with my own addon recently, is same as this. I may have to pick a value in color picker, but then gamma correct for my actual code or something… Mine was not matching, one was darker than I expected/same thing.

Actually, when i export materials from blender into 3DS Max, I gamma correct the colors coming in as well, in my maxscript, since similar issue.

I found this topic on blender dev https://developer.blender.org/T41287 what a mess…

an international standard? https://www.color.org/index.xalter

I found this code from sublim text. but I must watch it later to understand maybe better. hard the first time… https://github.com/weslly/ColorPicker/blob/master/sublimecp.py
the code seems so clean

Yeah, I don’t think Blender is designed to render with color-matching in mind. I get the impression that we’re expected to do that in post-processing, either in the Compositor or in an external program like Photoshop.

That said, I’ve found that I get better color matching by always using the HEX code instead of RGB or HSL values. Blender seems to like converting HEX values to the local color space, and the HEX values stay consistent, while I’ve sometimes noticed my RGB numbers get altered from what I’d originally pasted in.

And of course, avoid using Color Management > View Transform > Filmic. Sticking with View Transform > Standard and Look > None keeps you closer to standard sRGB values.

2 Likes

yeah… what a mess… lmao.

I’ve seen alot of people moving into ACES lately seems like, or maybe because of all this color management BS. But that’s more so in film/video.