The great answer by Mohit is targeted at the .NET System.Drawing.Bitmap class. Android has a different drawing class and representation of Color. You can find documentation on Color here: https://developer.xamarin.com/api/type/Android.Graphics.Color/
The A, R, G, and B values from a color can be obtained with:
int color = bitmap.GetPixel(x, y);
var androidColor = new Color(color);
byte r = androidColor.R;
byte g = androidColor.G;
byte b = androidColor.B;
byte alpha = androidColor.A;
It should be possible to use the provided algorithm as-is with those modifications in place.