You can get your root view as a bitmap and then sample pixels.
For example:
View myLayout = findViewById(R.id.myRootLayout);
myLayout.setDrawingCacheEnabled(true);
Bitmap bitmap = myLayout.getDrawingCache();
myLayout.setDrawingCacheEnabled(false);
//sample a pixel
int color = bitmap.getPixel(20,20);