C# BlinkStickColorUnderPointer

Just want to share an experiment I did.

This is C# code that allows you to move the mouse pointer around the desktop and have the color under the pointer show in your BlinkStick. It requires BlickStickDotNet.dll reference.

This is brilliant! Thanks for sharing :smile: Reminds me that I had code example somewhere which uses webcam so you can point it anywhere and BlinkStick would light up with the color detected in the middle of the video. Like a 1 pixel scanner or color picker :smiley: Will need to find it and post it here.

Thank you for sharing!
Maybe you can simplify it a bit:

static Color GetPixel(Point position)
    using (var bitmap = new Bitmap(1, 1))
        using (var graphics = Graphics.FromImage(bitmap))
            graphics.CopyFromScreen(position, new Point(0, 0), new Size(1, 1));
        return bitmap.GetPixel(0, 0);


Color col = GetPixel(Cursor.Position); 
device.SetColor(col.R, col.G, col.B);

Ok, GetPixel is not the fastest , but it should be enough for this purposeā€¦ Just an idea :wink: