I read your question as "I need to get the colour value at the mouse position."
You can use
Bitmap.GetPixel()[
^].
But there are several drawbacks to that.
1. You need a bitmap image you can call the method on. Maybe that's not a problem but in your code sample there is nothing that points to where the
OnMouseMoved
event comes from, especially since
Control.OnMouseMove[
^] doesn't have a "d" at its end.
2. It is a rather slow operation. However, since it's used in a user-induced event, this may not hurt too much (Users are even slower than slow operations).