I got thinking that an alternative to the expensive screen grabbing process would be to modify retroarch or create an output plugin (assuming this can be done) that computes the required border pixel colors from each emulated frame, and then send this to hyperion in a more efficient way than plain screen capturing.
but again this requires someone with experience on retroarch programming 🙂