Skip to content

Choose a color from anywhere on your screen.

Events

Name
ColorPicked

Methods

Name
Start
Stop

Example

cs
EyeDropper eyeDropper = new EyeDropper();
eyeDropper.ColorPicked += OnColorPicked;
eyeDropper.Start();

private void OnColorPicked(sender s, Color color)
{
    DispatcherQueue.TryEnqueue(() =>
    {
        myBorder.Background = new SolidColorBrush(color);
    });
}

WARNING

EyeDropper uses a GlobalMouseHook, which operates on a separate thread. Because of this, if you need to update the UI in the ColorPicked event, you must call it from a DispatcherQueue to avoid exceptions.

EyeDropper

Demo

you can run demo and see this feature.

Released under the MIT License.