Get pixel color anywhere on desktop

Hi all,
I want to write a litte helper tool for my son in law who is red/green colorblind.
Searching I only found ScreenshotWindowRectMBS, but that’s Mac only.
Any hints where to look? I have the einhugur and mbs plugins, but did not find what I search for.
thx in advance.

do you know that windows have a build in color filter mode for this kind of people?

maybe have a look at msdn
GetDC
GetPixel

ScreenshotRectMBS with a small rectangle?

1 Like

Thank you for your hint.
Since he has to read color coded maps and plans this is not a practical solution, we tried that.

I’ll try that, thank you.
With all the functions of MBS I often don’t see the tree in the woods :wink:

This works, thank you Christian.

My quick solution is this, maybe someone else has use for it:

Window with 50x50 Canvas and a label, the following code in a timer:

Var f As Double = Screen(0).ScaleFactor
Var p As Picture = ScreenshotRectMBS((Self.Left + MouseX - 25) * F, (Self.top + MouseY - 25) * F, 50 + F, 50 * F)
Var pcolor As Color = p.RGBSurface.Pixel(25,25)

canvas1.Backdrop = p
Canvas1.Backdrop.Graphics.DrawLine(25,0,25,50)
Canvas1.Backdrop.Graphics.DrawLine(0,25,50,25)

lbl_Info.Text = _
"R: " + CStr(pcolor.Red) + EndOfLine + _
"G: " + CStr(pcolor.Green) + EndOfLine + _
"B: " + CStr(pcolor.Blue)